Compare commits
25
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
972ab2f102 | ||
|
|
47d4961ea6 | ||
|
|
31f115540f | ||
|
|
05600e51d2 | ||
|
|
201cadbd49 | ||
|
|
82f28ae6ba | ||
|
|
63e3d66cc1 | ||
|
|
2ffb98c6f7 | ||
|
|
b2f8f63a65 | ||
|
|
e99787242e | ||
|
|
d8dbd14af8 | ||
|
|
679f3e8d79 | ||
|
|
a1b75c31e9 | ||
|
|
35b40e6ff7 | ||
|
|
a500c1a49a | ||
|
|
bba8a410f8 | ||
|
|
f59582ab42 | ||
|
|
16e17abb7e | ||
|
|
9e7e0377a5 | ||
|
|
36de257357 | ||
|
|
0710ed1bb1 | ||
|
|
c4254bdff1 | ||
|
|
1088313ab7 | ||
|
|
ffdf0a0d4d | ||
|
|
edabfcc9c9 |
@@ -1,25 +0,0 @@
|
|||||||
name: Docker Compose Build
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
name: Run docker build
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- name: Get the version
|
|
||||||
id: vars
|
|
||||||
run: echo ::set-output name=sha::$(echo ${GITHUB_SHA:0:7})
|
|
||||||
- name: Run docker build
|
|
||||||
run: make docker-build
|
|
||||||
- name: Tag docker image
|
|
||||||
run: docker tag vulcanize/ipld-eth-db docker.pkg.github.com/vulcanize/ipld-eth-db/ipld-eth-db:${{steps.vars.outputs.sha}}
|
|
||||||
- name: Docker Login
|
|
||||||
run: echo ${{ secrets.GITHUB_TOKEN }} | docker login https://docker.pkg.github.com -u vulcanize --password-stdin
|
|
||||||
- name: Docker Push
|
|
||||||
run: docker push docker.pkg.github.com/vulcanize/ipld-eth-db/ipld-eth-db:${{steps.vars.outputs.sha}}
|
|
||||||
|
|
||||||
@@ -1,11 +1,28 @@
|
|||||||
name: Publish Docker image
|
name: Publish Docker image
|
||||||
on:
|
on:
|
||||||
release:
|
release:
|
||||||
types: [published]
|
types: [published, edited]
|
||||||
jobs:
|
jobs:
|
||||||
|
build:
|
||||||
|
name: Run docker build
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Get the version
|
||||||
|
id: vars
|
||||||
|
run: echo ::set-output name=sha::$(echo ${GITHUB_SHA:0:7})
|
||||||
|
- name: Run docker build
|
||||||
|
run: make docker-build
|
||||||
|
- name: Tag docker image
|
||||||
|
run: docker tag vulcanize/ipld-eth-db docker.pkg.github.com/vulcanize/ipld-eth-db/ipld-eth-db:${{steps.vars.outputs.sha}}
|
||||||
|
- name: Docker Login
|
||||||
|
run: echo ${{ secrets.GITHUB_TOKEN }} | docker login https://docker.pkg.github.com -u vulcanize --password-stdin
|
||||||
|
- name: Docker Push
|
||||||
|
run: docker push docker.pkg.github.com/vulcanize/ipld-eth-db/ipld-eth-db:${{steps.vars.outputs.sha}}
|
||||||
push_to_registries:
|
push_to_registries:
|
||||||
name: Push Docker image to Docker Hub
|
name: Push Docker image to Docker Hub
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
needs: build
|
||||||
steps:
|
steps:
|
||||||
- name: Get the version
|
- name: Get the version
|
||||||
id: vars
|
id: vars
|
||||||
@@ -21,4 +38,4 @@ jobs:
|
|||||||
- name: Tag docker image
|
- name: Tag docker image
|
||||||
run: docker tag docker.pkg.github.com/vulcanize/ipld-eth-db/ipld-eth-db:${{steps.vars.outputs.sha}} vulcanize/ipld-eth-db:${{steps.vars.outputs.tag}}
|
run: docker tag docker.pkg.github.com/vulcanize/ipld-eth-db/ipld-eth-db:${{steps.vars.outputs.sha}} vulcanize/ipld-eth-db:${{steps.vars.outputs.tag}}
|
||||||
- name: Docker Push to Docker Hub
|
- name: Docker Push to Docker Hub
|
||||||
run: docker push vulcanize/ipld-eth-db:${{steps.vars.outputs.tag}}
|
run: docker push vulcanize/ipld-eth-db:${{steps.vars.outputs.tag}}
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ BIN = $(GOPATH)/bin
|
|||||||
## Migration tool
|
## Migration tool
|
||||||
GOOSE = $(BIN)/goose
|
GOOSE = $(BIN)/goose
|
||||||
$(BIN)/goose:
|
$(BIN)/goose:
|
||||||
GO111MODULE=off go get -u github.com/pressly/goose/cmd/goose
|
go get -u github.com/pressly/goose/cmd/goose
|
||||||
|
|
||||||
.PHONY: installtools
|
.PHONY: installtools
|
||||||
installtools: | $(GOOSE)
|
installtools: | $(GOOSE)
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
-- +goose Up
|
-- +goose Up
|
||||||
-- header indexes
|
-- header indexes
|
||||||
CREATE INDEX block_number_index ON eth.header_cids USING brin (block_number);
|
CREATE INDEX block_number_index ON eth.header_cids USING brin (block_number);
|
||||||
CREATE INDEX header_cid_index ON eth.header_cids USING btree (cid);
|
CREATE UNIQUE INDEX header_cid_index ON eth.header_cids USING btree (cid);
|
||||||
CREATE INDEX header_mh_index ON eth.header_cids USING btree (mh_key);
|
CREATE UNIQUE INDEX header_mh_index ON eth.header_cids USING btree (mh_key);
|
||||||
CREATE INDEX state_root_index ON eth.header_cids USING btree (state_root);
|
CREATE INDEX state_root_index ON eth.header_cids USING btree (state_root);
|
||||||
CREATE INDEX timestamp_index ON eth.header_cids USING brin (timestamp);
|
CREATE INDEX timestamp_index ON eth.header_cids USING brin (timestamp);
|
||||||
|
|
||||||
@@ -11,8 +11,8 @@ CREATE INDEX uncle_header_id_index ON eth.uncle_cids USING btree (header_id);
|
|||||||
|
|
||||||
-- transaction indexes
|
-- transaction indexes
|
||||||
CREATE INDEX tx_header_id_index ON eth.transaction_cids USING btree (header_id);
|
CREATE INDEX tx_header_id_index ON eth.transaction_cids USING btree (header_id);
|
||||||
CREATE INDEX tx_cid_index ON eth.transaction_cids USING btree (cid);
|
CREATE UNIQUE INDEX tx_cid_index ON eth.transaction_cids USING btree (cid);
|
||||||
CREATE INDEX tx_mh_index ON eth.transaction_cids USING btree (mh_key);
|
CREATE UNIQUE INDEX tx_mh_index ON eth.transaction_cids USING btree (mh_key);
|
||||||
CREATE INDEX tx_dst_index ON eth.transaction_cids USING btree (dst);
|
CREATE INDEX tx_dst_index ON eth.transaction_cids USING btree (dst);
|
||||||
CREATE INDEX tx_src_index ON eth.transaction_cids USING btree (src);
|
CREATE INDEX tx_src_index ON eth.transaction_cids USING btree (src);
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
-- +goose Up
|
||||||
|
CREATE SCHEMA eth_meta;
|
||||||
|
|
||||||
|
-- +goose Down
|
||||||
|
DROP SCHEMA eth_meta;
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
-- +goose Up
|
||||||
|
CREATE TABLE eth_meta.watched_addresses (
|
||||||
|
address VARCHAR(66) PRIMARY KEY,
|
||||||
|
created_at BIGINT NOT NULL,
|
||||||
|
watched_at BIGINT NOT NULL,
|
||||||
|
last_filled_at BIGINT NOT NULL DEFAULT 0
|
||||||
|
);
|
||||||
|
|
||||||
|
-- +goose Down
|
||||||
|
DROP TABLE eth_meta.watched_addresses;
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
-- +goose Up
|
||||||
|
CREATE TABLE eth_meta.known_gaps (
|
||||||
|
starting_block_number bigint PRIMARY KEY,
|
||||||
|
ending_block_number bigint,
|
||||||
|
checked_out boolean,
|
||||||
|
processing_key bigint
|
||||||
|
);
|
||||||
|
|
||||||
|
-- +goose Down
|
||||||
|
DROP TABLE eth_meta.known_gaps;
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
-- +goose Up
|
||||||
|
ALTER TABLE eth.log_cids
|
||||||
|
ADD CONSTRAINT fk_log_leaf_mh_key
|
||||||
|
FOREIGN KEY (leaf_mh_key) REFERENCES public.blocks (key)
|
||||||
|
ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED;
|
||||||
|
|
||||||
|
-- +goose Down
|
||||||
|
ALTER TABLE eth.log_cids
|
||||||
|
DROP CONSTRAINT fk_log_leaf_mh_key;
|
||||||
+8
@@ -21,7 +21,15 @@ WHERE indrelid = (
|
|||||||
WHERE relname='eth.header_cids'
|
WHERE relname='eth.header_cids'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
ALTER TABLE eth.log_cids
|
||||||
|
DROP CONSTRAINT fk_log_leaf_mh_key;
|
||||||
|
|
||||||
-- +goose Down
|
-- +goose Down
|
||||||
|
ALTER TABLE eth.log_cids
|
||||||
|
ADD CONSTRAINT fk_log_leaf_mh_key
|
||||||
|
FOREIGN KEY (leaf_mh_key) REFERENCES public.blocks (key)
|
||||||
|
ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED;
|
||||||
|
|
||||||
UPDATE pg_index
|
UPDATE pg_index
|
||||||
SET indisready=true
|
SET indisready=true
|
||||||
WHERE indrelid = (
|
WHERE indrelid = (
|
||||||
+8
-3
@@ -20,11 +20,16 @@ WHERE indrelid = (
|
|||||||
FROM pg_class
|
FROM pg_class
|
||||||
WHERE relname='eth.log_cids'
|
WHERE relname='eth.log_cids'
|
||||||
);
|
);
|
||||||
REINDEX TABLE eth.header_cids;
|
|
||||||
REINDEX TABLE eth.transaction_cids;
|
DROP INDEX eth.tx_header_id_index;
|
||||||
REINDEX TABLE eth.log_cids;
|
DROP INDEX eth.block_number_index;
|
||||||
|
DROP INDEX eth.log_mh_index;
|
||||||
|
|
||||||
-- +goose Down
|
-- +goose Down
|
||||||
|
CREATE INDEX log_mh_index ON eth.log_cids USING btree (leaf_mh_key);
|
||||||
|
CREATE INDEX block_number_index ON eth.header_cids USING brin (block_number);
|
||||||
|
CREATE INDEX tx_header_id_index ON eth.transaction_cids USING btree (header_id);
|
||||||
|
|
||||||
UPDATE pg_index
|
UPDATE pg_index
|
||||||
SET indisready=false
|
SET indisready=false
|
||||||
WHERE indrelid = (
|
WHERE indrelid = (
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
-- +goose Up
|
||||||
|
DROP INDEX eth.log_cids_index;
|
||||||
|
DROP INDEX eth.tx_tx_hash_index;
|
||||||
|
DROP INDEX eth.header_block_hash_index;
|
||||||
|
|
||||||
|
-- +goose Down
|
||||||
|
CREATE INDEX header_block_hash_index ON eth.header_cids USING btree (block_hash);
|
||||||
|
CREATE INDEX tx_tx_hash_index ON eth.transaction_cids USING btree (tx_hash);
|
||||||
|
CREATE INDEX log_cids_index ON eth.log_cids USING btree (rct_id, index);
|
||||||
+25
-25
@@ -30,32 +30,32 @@ ALTER TABLE eth.state_accounts
|
|||||||
ADD CONSTRAINT pk_eth_state_accounts PRIMARY KEY (header_id, state_path);
|
ADD CONSTRAINT pk_eth_state_accounts PRIMARY KEY (header_id, state_path);
|
||||||
|
|
||||||
-- +goose Down
|
-- +goose Down
|
||||||
ALTER TABLE public.nodes
|
ALTER TABLE eth.state_accounts
|
||||||
DROP CONSTRAINT pk_public_nodes;
|
DROP CONSTRAINT pk_eth_state_accounts;
|
||||||
|
|
||||||
ALTER TABLE eth.header_cids
|
|
||||||
DROP CONSTRAINT pk_eth_header_cids;
|
|
||||||
|
|
||||||
ALTER TABLE eth.uncle_cids
|
|
||||||
DROP CONSTRAINT pk_eth_uncle_cids;
|
|
||||||
|
|
||||||
ALTER TABLE eth.transaction_cids
|
|
||||||
DROP CONSTRAINT pk_eth_transaction_cids;
|
|
||||||
|
|
||||||
ALTER TABLE eth.receipt_cids
|
|
||||||
DROP CONSTRAINT pk_eth_receipt_cids;
|
|
||||||
|
|
||||||
ALTER TABLE eth.access_list_elements
|
|
||||||
DROP CONSTRAINT pk_eth_access_list_elements;
|
|
||||||
|
|
||||||
ALTER TABLE eth.log_cids
|
|
||||||
DROP CONSTRAINT pk_eth_log_cids;
|
|
||||||
|
|
||||||
ALTER TABLE eth.state_cids
|
|
||||||
DROP CONSTRAINT pk_eth_state_cids;
|
|
||||||
|
|
||||||
ALTER TABLE eth.storage_cids
|
ALTER TABLE eth.storage_cids
|
||||||
DROP CONSTRAINT pk_eth_storage_cids;
|
DROP CONSTRAINT pk_eth_storage_cids;
|
||||||
|
|
||||||
ALTER TABLE eth.state_accounts
|
ALTER TABLE eth.state_cids
|
||||||
DROP CONSTRAINT pk_eth_state_accounts;
|
DROP CONSTRAINT pk_eth_state_cids;
|
||||||
|
|
||||||
|
ALTER TABLE eth.log_cids
|
||||||
|
DROP CONSTRAINT pk_eth_log_cids;
|
||||||
|
|
||||||
|
ALTER TABLE eth.access_list_elements
|
||||||
|
DROP CONSTRAINT pk_eth_access_list_elements;
|
||||||
|
|
||||||
|
ALTER TABLE eth.receipt_cids
|
||||||
|
DROP CONSTRAINT pk_eth_receipt_cids;
|
||||||
|
|
||||||
|
ALTER TABLE eth.transaction_cids
|
||||||
|
DROP CONSTRAINT pk_eth_transaction_cids;
|
||||||
|
|
||||||
|
ALTER TABLE eth.uncle_cids
|
||||||
|
DROP CONSTRAINT pk_eth_uncle_cids;
|
||||||
|
|
||||||
|
ALTER TABLE eth.header_cids
|
||||||
|
DROP CONSTRAINT pk_eth_header_cids;
|
||||||
|
|
||||||
|
ALTER TABLE public.nodes
|
||||||
|
DROP CONSTRAINT pk_public_nodes;
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
-- +goose Up
|
||||||
|
CREATE SCHEMA eth_meta;
|
||||||
|
|
||||||
|
-- +goose Down
|
||||||
|
DROP SCHEMA eth_meta;
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
-- +goose Up
|
||||||
|
CREATE TABLE eth_meta.watched_addresses (
|
||||||
|
address VARCHAR(66) PRIMARY KEY,
|
||||||
|
created_at BIGINT NOT NULL,
|
||||||
|
watched_at BIGINT NOT NULL,
|
||||||
|
last_filled_at BIGINT NOT NULL DEFAULT 0
|
||||||
|
);
|
||||||
|
|
||||||
|
-- +goose Down
|
||||||
|
DROP TABLE eth_meta.watched_addresses;
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
-- +goose Up
|
||||||
|
CREATE TABLE eth_meta.known_gaps (
|
||||||
|
starting_block_number bigint PRIMARY KEY,
|
||||||
|
ending_block_number bigint,
|
||||||
|
checked_out boolean,
|
||||||
|
processing_key bigint
|
||||||
|
);
|
||||||
|
|
||||||
|
-- +goose Down
|
||||||
|
DROP TABLE eth_meta.known_gaps;
|
||||||
+10
-4
@@ -1,7 +1,8 @@
|
|||||||
-- +goose Up
|
-- +goose Up
|
||||||
-- header indexes
|
-- header indexes
|
||||||
CREATE INDEX header_cid_index ON eth.header_cids USING btree (cid);
|
CREATE INDEX block_number_index ON eth.header_cids USING brin (block_number);
|
||||||
CREATE INDEX header_mh_index ON eth.header_cids USING btree (mh_key);
|
CREATE UNIQUE INDEX header_cid_index ON eth.header_cids USING btree (cid);
|
||||||
|
CREATE UNIQUE INDEX header_mh_index ON eth.header_cids USING btree (mh_key);
|
||||||
CREATE INDEX state_root_index ON eth.header_cids USING btree (state_root);
|
CREATE INDEX state_root_index ON eth.header_cids USING btree (state_root);
|
||||||
CREATE INDEX timestamp_index ON eth.header_cids USING brin (timestamp);
|
CREATE INDEX timestamp_index ON eth.header_cids USING brin (timestamp);
|
||||||
|
|
||||||
@@ -9,8 +10,9 @@ CREATE INDEX timestamp_index ON eth.header_cids USING brin (timestamp);
|
|||||||
CREATE INDEX uncle_header_id_index ON eth.uncle_cids USING btree (header_id);
|
CREATE INDEX uncle_header_id_index ON eth.uncle_cids USING btree (header_id);
|
||||||
|
|
||||||
-- transaction indexes
|
-- transaction indexes
|
||||||
CREATE INDEX tx_cid_index ON eth.transaction_cids USING btree (cid);
|
CREATE INDEX tx_header_id_index ON eth.transaction_cids USING btree (header_id);
|
||||||
CREATE INDEX tx_mh_index ON eth.transaction_cids USING btree (mh_key);
|
CREATE UNIQUE INDEX tx_cid_index ON eth.transaction_cids USING btree (cid);
|
||||||
|
CREATE UNIQUE INDEX tx_mh_index ON eth.transaction_cids USING btree (mh_key);
|
||||||
CREATE INDEX tx_dst_index ON eth.transaction_cids USING btree (dst);
|
CREATE INDEX tx_dst_index ON eth.transaction_cids USING btree (dst);
|
||||||
CREATE INDEX tx_src_index ON eth.transaction_cids USING btree (src);
|
CREATE INDEX tx_src_index ON eth.transaction_cids USING btree (src);
|
||||||
|
|
||||||
@@ -45,6 +47,7 @@ CREATE INDEX access_list_storage_keys_index ON eth.access_list_elements USING gi
|
|||||||
|
|
||||||
-- log indexes
|
-- log indexes
|
||||||
CREATE INDEX log_cid_index ON eth.log_cids USING btree (leaf_cid);
|
CREATE INDEX log_cid_index ON eth.log_cids USING btree (leaf_cid);
|
||||||
|
CREATE INDEX log_mh_index ON eth.log_cids USING btree (leaf_mh_key);
|
||||||
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);
|
||||||
@@ -58,6 +61,7 @@ DROP INDEX eth.log_topic2_index;
|
|||||||
DROP INDEX eth.log_topic1_index;
|
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_mh_index;
|
||||||
DROP INDEX eth.log_cid_index;
|
DROP INDEX eth.log_cid_index;
|
||||||
|
|
||||||
-- access list indexes
|
-- access list indexes
|
||||||
@@ -94,6 +98,7 @@ DROP INDEX eth.tx_src_index;
|
|||||||
DROP INDEX eth.tx_dst_index;
|
DROP INDEX eth.tx_dst_index;
|
||||||
DROP INDEX eth.tx_mh_index;
|
DROP INDEX eth.tx_mh_index;
|
||||||
DROP INDEX eth.tx_cid_index;
|
DROP INDEX eth.tx_cid_index;
|
||||||
|
DROP INDEX eth.tx_header_id_index;
|
||||||
|
|
||||||
-- uncle indexes
|
-- uncle indexes
|
||||||
DROP INDEX eth.uncle_header_id_index;
|
DROP INDEX eth.uncle_header_id_index;
|
||||||
@@ -103,3 +108,4 @@ DROP INDEX eth.timestamp_index;
|
|||||||
DROP INDEX eth.state_root_index;
|
DROP INDEX eth.state_root_index;
|
||||||
DROP INDEX eth.header_mh_index;
|
DROP INDEX eth.header_mh_index;
|
||||||
DROP INDEX eth.header_cid_index;
|
DROP INDEX eth.header_cid_index;
|
||||||
|
DROP INDEX eth.block_number_index;
|
||||||
+51
-4
@@ -23,6 +23,13 @@ SET row_security = off;
|
|||||||
CREATE SCHEMA eth;
|
CREATE SCHEMA eth;
|
||||||
|
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Name: eth_meta; Type: SCHEMA; Schema: -; Owner: -
|
||||||
|
--
|
||||||
|
|
||||||
|
CREATE SCHEMA eth_meta;
|
||||||
|
|
||||||
|
|
||||||
SET default_tablespace = '';
|
SET default_tablespace = '';
|
||||||
|
|
||||||
SET default_table_access_method = heap;
|
SET default_table_access_method = heap;
|
||||||
@@ -402,6 +409,30 @@ CREATE TABLE eth.uncle_cids (
|
|||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Name: known_gaps; Type: TABLE; Schema: eth_meta; Owner: -
|
||||||
|
--
|
||||||
|
|
||||||
|
CREATE TABLE eth_meta.known_gaps (
|
||||||
|
starting_block_number bigint NOT NULL,
|
||||||
|
ending_block_number bigint,
|
||||||
|
checked_out boolean,
|
||||||
|
processing_key bigint
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Name: watched_addresses; Type: TABLE; Schema: eth_meta; Owner: -
|
||||||
|
--
|
||||||
|
|
||||||
|
CREATE TABLE eth_meta.watched_addresses (
|
||||||
|
address character varying(66) NOT NULL,
|
||||||
|
created_at bigint NOT NULL,
|
||||||
|
watched_at bigint NOT NULL,
|
||||||
|
last_filled_at bigint DEFAULT 0 NOT NULL
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Name: blocks; Type: TABLE; Schema: public; Owner: -
|
-- Name: blocks; Type: TABLE; Schema: public; Owner: -
|
||||||
--
|
--
|
||||||
@@ -562,6 +593,22 @@ ALTER TABLE ONLY eth.uncle_cids
|
|||||||
ADD CONSTRAINT uncle_cids_pkey PRIMARY KEY (block_hash);
|
ADD CONSTRAINT uncle_cids_pkey PRIMARY KEY (block_hash);
|
||||||
|
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Name: known_gaps known_gaps_pkey; Type: CONSTRAINT; Schema: eth_meta; Owner: -
|
||||||
|
--
|
||||||
|
|
||||||
|
ALTER TABLE ONLY eth_meta.known_gaps
|
||||||
|
ADD CONSTRAINT known_gaps_pkey PRIMARY KEY (starting_block_number);
|
||||||
|
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Name: watched_addresses watched_addresses_pkey; Type: CONSTRAINT; Schema: eth_meta; Owner: -
|
||||||
|
--
|
||||||
|
|
||||||
|
ALTER TABLE ONLY eth_meta.watched_addresses
|
||||||
|
ADD CONSTRAINT watched_addresses_pkey PRIMARY KEY (address);
|
||||||
|
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Name: blocks blocks_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
-- Name: blocks blocks_pkey; Type: CONSTRAINT; Schema: public; Owner: -
|
||||||
--
|
--
|
||||||
@@ -626,14 +673,14 @@ CREATE INDEX block_number_index ON eth.header_cids USING brin (block_number);
|
|||||||
-- Name: header_cid_index; Type: INDEX; Schema: eth; Owner: -
|
-- Name: header_cid_index; Type: INDEX; Schema: eth; Owner: -
|
||||||
--
|
--
|
||||||
|
|
||||||
CREATE INDEX header_cid_index ON eth.header_cids USING btree (cid);
|
CREATE UNIQUE INDEX header_cid_index ON eth.header_cids USING btree (cid);
|
||||||
|
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Name: header_mh_index; Type: INDEX; Schema: eth; Owner: -
|
-- Name: header_mh_index; Type: INDEX; Schema: eth; Owner: -
|
||||||
--
|
--
|
||||||
|
|
||||||
CREATE INDEX header_mh_index ON eth.header_cids USING btree (mh_key);
|
CREATE UNIQUE INDEX header_mh_index ON eth.header_cids USING btree (mh_key);
|
||||||
|
|
||||||
|
|
||||||
--
|
--
|
||||||
@@ -815,7 +862,7 @@ CREATE INDEX timestamp_index ON eth.header_cids USING brin ("timestamp");
|
|||||||
-- Name: tx_cid_index; Type: INDEX; Schema: eth; Owner: -
|
-- Name: tx_cid_index; Type: INDEX; Schema: eth; Owner: -
|
||||||
--
|
--
|
||||||
|
|
||||||
CREATE INDEX tx_cid_index ON eth.transaction_cids USING btree (cid);
|
CREATE UNIQUE INDEX tx_cid_index ON eth.transaction_cids USING btree (cid);
|
||||||
|
|
||||||
|
|
||||||
--
|
--
|
||||||
@@ -836,7 +883,7 @@ CREATE INDEX tx_header_id_index ON eth.transaction_cids USING btree (header_id);
|
|||||||
-- Name: tx_mh_index; Type: INDEX; Schema: eth; Owner: -
|
-- Name: tx_mh_index; Type: INDEX; Schema: eth; Owner: -
|
||||||
--
|
--
|
||||||
|
|
||||||
CREATE INDEX tx_mh_index ON eth.transaction_cids USING btree (mh_key);
|
CREATE UNIQUE INDEX tx_mh_index ON eth.transaction_cids USING btree (mh_key);
|
||||||
|
|
||||||
|
|
||||||
--
|
--
|
||||||
|
|||||||
Reference in New Issue
Block a user