renaming some columns; remove log_root column
This commit is contained in:
parent
27e923f70d
commit
f67f03481b
@ -3,13 +3,12 @@ CREATE TABLE IF NOT EXISTS eth.receipt_cids (
|
|||||||
block_number BIGINT NOT NULL,
|
block_number BIGINT NOT NULL,
|
||||||
header_id VARCHAR(66) NOT NULL,
|
header_id VARCHAR(66) NOT NULL,
|
||||||
tx_id VARCHAR(66) NOT NULL,
|
tx_id VARCHAR(66) NOT NULL,
|
||||||
leaf_cid TEXT NOT NULL,
|
cid TEXT NOT NULL,
|
||||||
contract VARCHAR(66),
|
contract VARCHAR(66),
|
||||||
contract_hash VARCHAR(66),
|
contract_hash VARCHAR(66),
|
||||||
leaf_mh_key TEXT NOT NULL,
|
mh_key TEXT NOT NULL,
|
||||||
post_state VARCHAR(66),
|
post_state VARCHAR(66),
|
||||||
post_status SMALLINT,
|
post_status SMALLINT,
|
||||||
log_root VARCHAR(66),
|
|
||||||
PRIMARY KEY (tx_id, header_id, block_number)
|
PRIMARY KEY (tx_id, header_id, block_number)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@ CREATE TABLE IF NOT EXISTS eth.state_cids (
|
|||||||
header_id VARCHAR(66) NOT NULL,
|
header_id VARCHAR(66) NOT NULL,
|
||||||
state_leaf_key VARCHAR(66) NOT NULL,
|
state_leaf_key VARCHAR(66) NOT NULL,
|
||||||
cid TEXT NOT NULL,
|
cid TEXT NOT NULL,
|
||||||
state_path BYTEA NOT NULL,
|
partial_path BYTEA NOT NULL,
|
||||||
diff BOOLEAN NOT NULL DEFAULT FALSE,
|
diff BOOLEAN NOT NULL DEFAULT FALSE,
|
||||||
mh_key TEXT NOT NULL,
|
mh_key TEXT NOT NULL,
|
||||||
balance NUMERIC, -- NULL if "removed"
|
balance NUMERIC, -- NULL if "removed"
|
||||||
|
@ -5,7 +5,7 @@ CREATE TABLE IF NOT EXISTS eth.storage_cids (
|
|||||||
state_leaf_key VARCHAR(66) NOT NULL,
|
state_leaf_key VARCHAR(66) NOT NULL,
|
||||||
storage_leaf_key VARCHAR(66) NOT NULL,
|
storage_leaf_key VARCHAR(66) NOT NULL,
|
||||||
cid TEXT NOT NULL,
|
cid TEXT NOT NULL,
|
||||||
storage_path BYTEA NOT NULL,
|
partial_path BYTEA NOT NULL,
|
||||||
diff BOOLEAN NOT NULL DEFAULT FALSE,
|
diff BOOLEAN NOT NULL DEFAULT FALSE,
|
||||||
mh_key TEXT NOT NULL,
|
mh_key TEXT NOT NULL,
|
||||||
val BYTEA, -- NULL if "removed"
|
val BYTEA, -- NULL if "removed"
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
CREATE TABLE IF NOT EXISTS eth.log_cids (
|
CREATE TABLE IF NOT EXISTS eth.log_cids (
|
||||||
block_number BIGINT NOT NULL,
|
block_number BIGINT NOT NULL,
|
||||||
header_id VARCHAR(66) NOT NULL,
|
header_id VARCHAR(66) NOT NULL,
|
||||||
leaf_cid TEXT NOT NULL,
|
cid TEXT NOT NULL,
|
||||||
leaf_mh_key TEXT NOT NULL,
|
mh_key TEXT NOT NULL,
|
||||||
rct_id VARCHAR(66) NOT NULL,
|
rct_id VARCHAR(66) NOT NULL,
|
||||||
address VARCHAR(66) NOT NULL,
|
address VARCHAR(66) NOT NULL,
|
||||||
index INTEGER NOT NULL,
|
index INTEGER NOT NULL,
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
-- instead, what we are doing for the time being is embedding the RLP here
|
-- instead, what we are doing for the time being is embedding the RLP here
|
||||||
CREATE TABLE IF NOT EXISTS eth.pending_txs (
|
CREATE TABLE IF NOT EXISTS eth.pending_txs (
|
||||||
tx_hash VARCHAR(66) NOT NULL PRIMARY KEY,
|
tx_hash VARCHAR(66) NOT NULL PRIMARY KEY,
|
||||||
|
timestamp BIGINT NOT NULL,
|
||||||
raw BYTEA NOT NULL
|
raw BYTEA NOT NULL
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -23,8 +23,8 @@ CREATE INDEX tx_data_index ON eth.transaction_cids USING btree (tx_data);
|
|||||||
-- receipt indexes
|
-- receipt indexes
|
||||||
CREATE INDEX rct_block_number_index ON eth.receipt_cids USING brin (block_number);
|
CREATE INDEX rct_block_number_index ON eth.receipt_cids USING brin (block_number);
|
||||||
CREATE INDEX rct_header_id_index ON eth.receipt_cids USING btree (header_id);
|
CREATE INDEX rct_header_id_index ON eth.receipt_cids USING btree (header_id);
|
||||||
CREATE INDEX rct_leaf_cid_index ON eth.receipt_cids USING btree (leaf_cid);
|
CREATE INDEX rct_cid_index ON eth.receipt_cids USING btree (cid);
|
||||||
CREATE INDEX rct_leaf_mh_block_number_index ON eth.receipt_cids USING btree (leaf_mh_key, block_number);
|
CREATE INDEX rct_mh_block_number_index ON eth.receipt_cids USING btree (mh_key, block_number);
|
||||||
CREATE INDEX rct_contract_index ON eth.receipt_cids USING btree (contract);
|
CREATE INDEX rct_contract_index ON eth.receipt_cids USING btree (contract);
|
||||||
CREATE INDEX rct_contract_hash_index ON eth.receipt_cids USING btree (contract_hash);
|
CREATE INDEX rct_contract_hash_index ON eth.receipt_cids USING btree (contract_hash);
|
||||||
|
|
||||||
@ -56,8 +56,8 @@ CREATE INDEX access_list_storage_keys_index ON eth.access_list_elements USING gi
|
|||||||
-- log indexes
|
-- log indexes
|
||||||
CREATE INDEX log_block_number_index ON eth.log_cids USING brin (block_number);
|
CREATE INDEX log_block_number_index ON eth.log_cids USING brin (block_number);
|
||||||
CREATE INDEX log_header_id_index ON eth.log_cids USING btree (header_id);
|
CREATE INDEX log_header_id_index ON eth.log_cids USING btree (header_id);
|
||||||
CREATE INDEX log_leaf_mh_block_number_index ON eth.log_cids USING btree (leaf_mh_key, block_number);
|
CREATE INDEX log_mh_block_number_index ON eth.log_cids USING btree (mh_key, block_number);
|
||||||
CREATE INDEX log_cid_index ON eth.log_cids USING btree (leaf_cid);
|
CREATE INDEX log_cid_index ON eth.log_cids USING btree (cid);
|
||||||
CREATE INDEX log_address_index ON eth.log_cids USING btree (address);
|
CREATE INDEX log_address_index ON eth.log_cids USING btree (address);
|
||||||
CREATE INDEX log_topic0_index ON eth.log_cids USING btree (topic0);
|
CREATE INDEX log_topic0_index ON eth.log_cids USING btree (topic0);
|
||||||
CREATE INDEX log_topic1_index ON eth.log_cids USING btree (topic1);
|
CREATE INDEX log_topic1_index ON eth.log_cids USING btree (topic1);
|
||||||
@ -74,7 +74,7 @@ DROP INDEX eth.log_topic1_index;
|
|||||||
DROP INDEX eth.log_topic0_index;
|
DROP INDEX eth.log_topic0_index;
|
||||||
DROP INDEX eth.log_address_index;
|
DROP INDEX eth.log_address_index;
|
||||||
DROP INDEX eth.log_cid_index;
|
DROP INDEX eth.log_cid_index;
|
||||||
DROP INDEX eth.log_leaf_mh_block_number_index;
|
DROP INDEX eth.log_mh_block_number_index;
|
||||||
DROP INDEX eth.log_header_id_index;
|
DROP INDEX eth.log_header_id_index;
|
||||||
DROP INDEX eth.log_block_number_index;
|
DROP INDEX eth.log_block_number_index;
|
||||||
|
|
||||||
@ -107,8 +107,8 @@ DROP INDEX eth.state_leaf_key_block_number_index;
|
|||||||
-- receipt indexes
|
-- receipt indexes
|
||||||
DROP INDEX eth.rct_contract_hash_index;
|
DROP INDEX eth.rct_contract_hash_index;
|
||||||
DROP INDEX eth.rct_contract_index;
|
DROP INDEX eth.rct_contract_index;
|
||||||
DROP INDEX eth.rct_leaf_mh_block_number_index;
|
DROP INDEX eth.rct_mh_block_number_index;
|
||||||
DROP INDEX eth.rct_leaf_cid_index;
|
DROP INDEX eth.rct_cid_index;
|
||||||
DROP INDEX eth.rct_header_id_index;
|
DROP INDEX eth.rct_header_id_index;
|
||||||
DROP INDEX eth.rct_block_number_index;
|
DROP INDEX eth.rct_block_number_index;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user