Skip to content

Instantly share code, notes, and snippets.

View rjl493456442's full-sized avatar
🐢

rjl493456442

🐢
View GitHub Profile
@@ -51,8 +50,16 @@ func TestLegacyReceiptDecoding(t *testing.T) {
Status: ReceiptStatusFailed,
CumulativeGasUsed: 1,
Logs: []*Log{
- {Address: common.BytesToAddress([]byte{0x11})},
- {Address: common.BytesToAddress([]byte{0x01, 0x11})},
+ {
+ Address: common.BytesToAddress([]byte{0x11}),
+ Topics: []common.Hash{common.HexToHash("dead"), common.HexToHash("beef")},
+ Data: []byte{0x01, 0x00, 0xff},
@rjl493456442
rjl493456442 / freezer.md
Created May 15, 2019 05:00
freezer panic
INFO [05-15|12:28:00.801] Imported new block headers               count=192  elapsed=31.558ms   number=63232 hash=f92063…26bbb6 age=3mo2d13h
INFO [05-15|12:28:00.817] Imported new block receipts              count=168  elapsed=11.135ms   number=63208 hash=e3866c…8610e9 age=3mo2d13h size=105.49KiB
INFO [05-15|12:28:10.996] Imported new block headers               count=192  elapsed=23.595ms   number=63424 hash=e70564…57eb7c age=3mo2d12h
INFO [05-15|12:28:11.802] Imported new block receipts              count=24   elapsed=4.730ms    number=63232 hash=f92063…26bbb6 age=3mo2d13h size=15.19KiB
INFO [05-15|12:28:11.813] Imported new block receipts              count=135  elapsed=9.612ms    number=63367 hash=dc96a3…ba14aa age=3mo2d12h size=84.77KiB
INFO [05-15|12:28:33.671] Imported new block headers               count=25   elapsed=14.581ms   number=63616 hash=bb57c2…258c3c age=3mo2d11h ignored=167
INFO [05-15|12:28:33.901] Imported new block receipts              count=53   elapsed=6.674ms    number=63420 has
diff --git a/core/blockchain.go b/core/blockchain.go
index 7d3c071ba..a1541505d 100644
--- a/core/blockchain.go
+++ b/core/blockchain.go
@@ -992,6 +992,7 @@ func (bc *BlockChain) InsertReceiptChain(blockChain types.Blocks, receiptChain [
 				}
 			}
 		}()
+		var deleted types.Blocks
diff --git a/core/blockchain_test.go b/core/blockchain_test.go
index 7b1a9a54f..6dcf5416b 100644
--- a/core/blockchain_test.go
+++ b/core/blockchain_test.go
@@ -716,6 +716,20 @@ func TestLightVsFastVsFullChainHeads(t *testing.T) {
 	height := uint64(1024)
 	blocks, receipts := GenerateChain(gspec.Config, genesis, ethash.NewFaker(), gendb, int(height), nil)
 
+	// makeDb creates a db instance for testing.
INFO [05-17|07:41:50.178] Imported new chain segment               blocks=1  txs=150  mgas=7.989  elapsed=381.123ms mgasps=20.963  number=7776442 hash=517e35…51ddac cache=130.46mB
INFO [05-17|07:41:50.179] Commit new mining work                   number=7776443 sealhash=19aaaf…4ecb7e uncles=0 txs=0    gas=0       fees=0             elapsed=910.385µs
INFO [05-17|07:41:50.826] Commit new mining work                   number=7776443 sealhash=d93abb…d443a0 uncles=0 txs=124  gas=7985041 fees=0.07965150093 elapsed=647.884ms
INFO [05-17|07:41:53.635] Imported new chain segment               blocks=1  txs=63   mgas=7.994  elapsed=339.421ms mgasps=23.553  number=7776443 hash=0b679e…ce0cb5 cache=130.46mB
INFO [05-17|07:41:53.636] Commit new mining work                   number=7776444 sealhash=248067…91f31a uncles=0 txs=0    gas=0       fees=0             elapsed=562.284µs
INFO [05-17|07:41:53.721] Imported new chain segment               blocks=1  txs=123  mgas=7.986  elapsed=85.584ms  mgasps=93.312  number=777644
"INFO [05-14|03:00:00.285] Imported new chain segment               blocks=1 txs=149 mgas=7.995 elapsed=178.950ms mgasps=44.679  number=7755917 hash=6e9c2b…b1f78c cache=152.90mB\n"
"INFO [05-14|03:00:00.286] Commit new mining work                   number=7755918 sealhash=9bb63b…1e91d9 uncles=0 txs=0   gas=0       fees=0               elapsed=906.383µs\n"
"INFO [05-14|03:00:00.716] Commit new mining work                   number=7755918 sealhash=ed5fd4…1e7e92 uncles=0 txs=147 gas=8002737 fees=0.05615056674   elapsed=431.248ms\n"
"INFO [05-14|03:00:13.317] Commit new mining work                   number=7755918 sealhash=94a980…0a7e0c uncles=0 txs=175 gas=8004159 fees=0.1060735548    elapsed=1.031s\n"
"INFO [05-14|03:00:19.731] Successfully sealed new block            number=7755918 sealhash=94a980…0a7e0c hash=f7aaf9…3039cd elapsed=6.414s\n"
"INFO [05-14|03:00:19.731] 🔨 mined potential block                  number=7755918 hash=f7aaf9…3039cd\n"
"INFO [05-14|03:00:19.733] Commit new mining work              

Les server statistic

Request type Parameter AvgTime MaxInSize MaxOutSize
Header Amount = 192 3014361 11 116694
Header Amount = 192, Reverse = True 2847837 11 116694
Header Amount = 192, ByHash = True 3742934 40 116694
Header Amount = 192, ByHash = True, Reverse = True 3136450 40 116694
Body Amount = 1 131428 36 1693918
Receipt Amount = 1 146270 36 166439
Time, recentTime (min), recentTime (max), queuedTime (min), queuedTime (max), totalCapacity, relativeCost (min), relativeCost (max), recentUsage (min), recentUsage (max), totalRecharge, totalFreeConn, totalPriConn, event, peerId
10.000625, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
20.00125, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
30.001875, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
40.0025, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
50.003125, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
60.00375, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
70.004375, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
80.005, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0

Registrar

Registrar is a command line tool to manipulate checkpoint contract. You can deploy contract, query latest checkpoint, sign checkpoint or register checkpoint via registrar.

registrar [global options] command [command options] [arguments...]

VERSION:
   1.9.0-unstable
INFO [06-27|21:11:28.404] Imported new state entries               count=1520 elapsed=4.000ms   processed=8503013 pending=8787  retry=4   duplicate=300 unexpected=850
INFO [06-27|21:11:29.168] Imported new state entries               count=760  elapsed=0s        processed=8503773 pending=11605 retry=4   duplicate=300 unexpected=850
INFO [06-27|21:11:30.344] Imported new block receipts              count=1152 elapsed=2.188s    number=3659238 hash=d097b4…888d29 age=5mo2w5d    size=11.38MiB
INFO [06-27|21:11:30.924] Imported new state entries               count=1900 elapsed=8.000ms   processed=8505673 pending=10343 retry=4   duplicate=300 unexpected=850
INFO [06-27|21:11:32.516] Imported new block receipts              count=640  elapsed=2.164s    number=3659878 hash=4cdae1…7e158c age=5mo2w5d    size=6.32MiB
INFO [06-27|21:11:32.736] Imported new state entries               count=1900 elapsed=8.000ms   processed=8507573 pending=9020  retry=4   duplicate=300 unexpected=850
INFO [06-27|21:11:34.200] Imported