Skip to content

Commit

Permalink
Add receipts_root to blocks.csv
Browse files Browse the repository at this point in the history
  • Loading branch information
medvedev1088 committed Aug 4, 2018
1 parent 345aa8d commit 1cb2f4e
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 7 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ sha3_uncles | hex_string |
logs_bloom | hex_string |
transactions_root | hex_string |
state_root | hex_string |
receipts_root | hex_string |
miner | address |
difficulty | numeric |
total_difficulty | numeric |
Expand Down
1 change: 1 addition & 0 deletions ethereumetl/domain/block.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ def __init__(self):
self.logs_bloom = None
self.transactions_root = None
self.state_root = None
self.receipts_root = None
self.miner = None
self.difficulty = None
self.total_difficulty = None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
'logs_bloom',
'transactions_root',
'state_root',
'receipts_root',
'miner',
'difficulty',
'total_difficulty',
Expand Down
2 changes: 2 additions & 0 deletions ethereumetl/mappers/block_mapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ def json_dict_to_block(self, json_dict):
block.logs_bloom = json_dict.get('logsBloom', None)
block.transactions_root = json_dict.get('transactionsRoot', None)
block.state_root = json_dict.get('stateRoot', None)
block.receipts_root = json_dict.get('receiptsRoot', None)
block.miner = to_normalized_address(json_dict.get('miner', None))
block.difficulty = hex_to_dec(json_dict.get('difficulty', None))
block.total_difficulty = hex_to_dec(json_dict.get('totalDifficulty', None))
Expand Down Expand Up @@ -73,6 +74,7 @@ def block_to_dict(self, block):
'logs_bloom': block.logs_bloom,
'transactions_root': block.transactions_root,
'state_root': block.state_root,
'receipts_root': block.receipts_root,
'miner': block.miner,
'difficulty': block.difficulty,
'total_difficulty': block.total_difficulty,
Expand Down
1 change: 1 addition & 0 deletions schemas/aws/blocks.sql
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ CREATE EXTERNAL TABLE IF NOT EXISTS blocks (
logs_bloom STRING,
transactions_root STRING,
state_root STRING,
receipts_root STRING,
miner STRING,
difficulty DECIMAL(38,0),
total_difficulty DECIMAL(38,0),
Expand Down
1 change: 1 addition & 0 deletions schemas/aws/parquet/parquet_blocks.sql
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ CREATE EXTERNAL TABLE IF NOT EXISTS parquet_blocks (
logs_bloom STRING,
transactions_root STRING,
state_root STRING,
receipts_root STRING,
miner STRING,
difficulty DECIMAL(38,0),
total_difficulty DECIMAL(38,0),
Expand Down
5 changes: 5 additions & 0 deletions schemas/gcp/blocks.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@
"type": "STRING",
"description": "The root of the final state trie of the block"
},
{
"name": "receipts_root",
"type": "STRING",
"description": "The root of the receipts trie of the block"
},
{
"name": "miner",
"type": "STRING",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
number,hash,parent_hash,nonce,sha3_uncles,logs_bloom,transactions_root,state_root,miner,difficulty,total_difficulty,size,extra_data,gas_limit,gas_used,timestamp,transaction_count
483920,0x246edb4b351d93c27926f4649bcf6c24366e2a7c7c718dc9158eea20c03bc6ae,0x2610dc6eb941f4bcbddfd2362b999087ccd956e978f0ece4f8da96851283a2ba,0x57a633e01197dc86,0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347,0x00000000000000000000000000800000000000000000000000000000800000000000000000000000000000008000000000000000000000000000000000000021000000080000000004000008000000000000000000000400000000000000000000000000000000400000000000000000000000000000000000000010000000000000000000000000000000000000000400000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000010000000000000000000000000000000000000000000000004000000000000000000000000000000000000040080000,0x2744d46ab0647ed91a9bbd08e19d3bb67491067e8cbe04a276ad2afde5ecd65e,0x48b17dd0031aa97d748a886c912539de22997e861d631fd1eb6509fbabef9651,0x52bc44d5378309ee2abf1539bf71de1b7d7be3b5,7298514125186,2571481026230204460,1113,0xd783010203844765746887676f312e342e32856c696e7578,3141592,143706,1446561880,4
number,hash,parent_hash,nonce,sha3_uncles,logs_bloom,transactions_root,state_root,receipts_root,miner,difficulty,total_difficulty,size,extra_data,gas_limit,gas_used,timestamp,transaction_count
483920,0x246edb4b351d93c27926f4649bcf6c24366e2a7c7c718dc9158eea20c03bc6ae,0x2610dc6eb941f4bcbddfd2362b999087ccd956e978f0ece4f8da96851283a2ba,0x57a633e01197dc86,0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347,0x00000000000000000000000000800000000000000000000000000000800000000000000000000000000000008000000000000000000000000000000000000021000000080000000004000008000000000000000000000400000000000000000000000000000000400000000000000000000000000000000000000010000000000000000000000000000000000000000400000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000010000000000000000000000000000000000000000000000004000000000000000000000000000000000000040080000,0x2744d46ab0647ed91a9bbd08e19d3bb67491067e8cbe04a276ad2afde5ecd65e,0x48b17dd0031aa97d748a886c912539de22997e861d631fd1eb6509fbabef9651,0xada95dd1e1590fe095e67c58f41d633193b238e0e0c588de46682db595738f0b,0x52bc44d5378309ee2abf1539bf71de1b7d7be3b5,7298514125186,2571481026230204460,1113,0xd783010203844765746887676f312e342e32856c696e7578,3141592,143706,1446561880,4
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
number,hash,parent_hash,nonce,sha3_uncles,logs_bloom,transactions_root,state_root,miner,difficulty,total_difficulty,size,extra_data,gas_limit,gas_used,timestamp,transaction_count
0,0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3,0x0000000000000000000000000000000000000000000000000000000000000000,0x0000000000000042,0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347,0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421,0xd7f8974fb5ac78d9ac099b9ad5018bedc2ce0a72dad1827a1709da30580f0544,0x0000000000000000000000000000000000000000,17179869184,17179869184,540,0x11bbe8db4e347b4e8c937c1c8370e4b5ed33adb3db69cbdb7a38e1e50b1b82fa,5000,0,0,0
number,hash,parent_hash,nonce,sha3_uncles,logs_bloom,transactions_root,state_root,receipts_root,miner,difficulty,total_difficulty,size,extra_data,gas_limit,gas_used,timestamp,transaction_count
0,0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3,0x0000000000000000000000000000000000000000000000000000000000000000,0x0000000000000042,0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347,0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421,0xd7f8974fb5ac78d9ac099b9ad5018bedc2ce0a72dad1827a1709da30580f0544,0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421,0x0000000000000000000000000000000000000000,17179869184,17179869184,540,0x11bbe8db4e347b4e8c937c1c8370e4b5ed33adb3db69cbdb7a38e1e50b1b82fa,5000,0,0,0
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
number,hash,parent_hash,nonce,sha3_uncles,logs_bloom,transactions_root,state_root,miner,difficulty,total_difficulty,size,extra_data,gas_limit,gas_used,timestamp,transaction_count
47218,0x889c421abc62a48641eee140519e6da8c9dc01d85d8f5c4fbc3c13e3c6e4cb3e,0xfc1dd3249585b593ad18822a95873c75779ccbe8a420b457be380b977fc38e87,0xfaa1e51d379b21f7,0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347,0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,0xdef39a3afcfb55fabd16d7d5a19d8b078cb95a117ea9596af289525eb8592982,0xab6d1b109c04c1f43f86da33ece31689d9ba1c44ea809d0979c05057a0703c28,0x9746c7e1ef2bd21ff3997fa467593a89cb852bd0,1460233976906,44246932724217368,766,0x476574682f76312e302e312f77696e646f77732f676f312e342e32,42085,42000,1438936285,2
47219,0x944f09177142833c644c979a83900d8cae1ee67369774b88b3b330bb72825082,0x889c421abc62a48641eee140519e6da8c9dc01d85d8f5c4fbc3c13e3c6e4cb3e,0x52cf720359834975,0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347,0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,0xd757552351d6a714feda148f8f6f1283e000e05ea407352d45bc9dfc4c16ffe9,0x05a16e52dbacec805dc881439ef54338e8324ee133a4dbbb8ab17f8c73290054,0xf927a40c8b7f6e07c5af7fa2155b4864a4112b13,1459520972035,44248392245189403,763,0x476574682f76312e302e312f6c696e75782f676f312e342e32,42125,42000,1438936326,2
number,hash,parent_hash,nonce,sha3_uncles,logs_bloom,transactions_root,state_root,receipts_root,miner,difficulty,total_difficulty,size,extra_data,gas_limit,gas_used,timestamp,transaction_count
47218,0x889c421abc62a48641eee140519e6da8c9dc01d85d8f5c4fbc3c13e3c6e4cb3e,0xfc1dd3249585b593ad18822a95873c75779ccbe8a420b457be380b977fc38e87,0xfaa1e51d379b21f7,0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347,0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,0xdef39a3afcfb55fabd16d7d5a19d8b078cb95a117ea9596af289525eb8592982,0xab6d1b109c04c1f43f86da33ece31689d9ba1c44ea809d0979c05057a0703c28,0xf0afaf08454f89092907f820c40db77afbd0270f179166907dc110f9723972d7,0x9746c7e1ef2bd21ff3997fa467593a89cb852bd0,1460233976906,44246932724217368,766,0x476574682f76312e302e312f77696e646f77732f676f312e342e32,42085,42000,1438936285,2
47219,0x944f09177142833c644c979a83900d8cae1ee67369774b88b3b330bb72825082,0x889c421abc62a48641eee140519e6da8c9dc01d85d8f5c4fbc3c13e3c6e4cb3e,0x52cf720359834975,0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347,0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,0xd757552351d6a714feda148f8f6f1283e000e05ea407352d45bc9dfc4c16ffe9,0x05a16e52dbacec805dc881439ef54338e8324ee133a4dbbb8ab17f8c73290054,0x9c8327de15d9d1668feb6e3583ddc337fb857620a5a3ff66d0d66148864b9d55,0xf927a40c8b7f6e07c5af7fa2155b4864a4112b13,1459520972035,44248392245189403,763,0x476574682f76312e302e312f6c696e75782f676f312e342e32,42125,42000,1438936326,2

0 comments on commit 1cb2f4e

Please sign in to comment.