Compare commits

...
Author SHA1 Message Date
Abdul Rabbani 972ab2f102 Allow edited release tags to run the pipeline 2022-05-13 08:03:26 -04:00
Abdul Rabbani 47d4961ea6 Require the push job to wait. 2022-05-13 07:59:13 -04:00
Abdul Rabbani 31f115540f Combine docker build and push for releases 2022-05-12 11:18:08 -04:00
Ian Norden 05600e51d2 Merge pull request #59 from vulcanize/release-v3.2.0
update the pre- and post- batch sets with new meta schema and tables
2022-03-31 12:47:32 -05:00
i-norden 201cadbd49 update the pre- and post- batch sets with new meta schema and tables 2022-03-31 12:45:27 -05:00
Ian Norden 82f28ae6ba Merge pull request #53 from vulcanize/feature/known_table
Add `known_gaps` table
2022-03-31 11:12:54 -05:00
Abdul Rabbani 63e3d66cc1 Merge branch 'main' into feature/known_table 2022-03-31 12:07:28 -04:00
Abdul Rabbani 2ffb98c6f7 Change file name 2022-03-31 12:06:11 -04:00
Abdul Rabbani b2f8f63a65 Update file name 2022-03-31 10:47:29 -04:00
Abdul Rabbani e99787242e Add Migration file 2022-03-31 10:45:11 -04:00
Ian Norden d8dbd14af8 Merge pull request #54 from deep-stack/ng-watched-addresses-v3
Add a table for watched addresses (v3)
2022-03-23 07:08:59 -05:00
nabarun 679f3e8d79 Remove GO111MODULE flag when installing goose in makefile
Passing GO111MODULE=off with go get throws error. The CI fails due to this when using the makefile.
2022-03-21 17:07:46 +05:30
Abdul Rabbani a1b75c31e9 Update schema.sql 2022-03-19 09:17:48 -04:00
Abdul Rabbani 35b40e6ff7 Add known_gaps table - DO NOT MERGE YET!!
We will probably need to change the `modulus_block_number` columns name
2022-03-18 14:35:07 -04:00
nabarun a500c1a49a Add table for watched addresses in eth_meta schema 2022-03-17 19:02:05 +05:30
Ian Norden bba8a410f8 Merge pull request #50 from vulcanize/release-v3.0.7
Release v3.0.7
2022-03-07 11:12:09 -06:00
i-norden f59582ab42 indexes on receipt cid and mh_key should not be unique, as it is possible (but improbable) that two receipts can be identical 2022-02-16 14:11:23 -06:00
19 changed files with 149 additions and 61 deletions
-25
View File
@@ -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}}
+19 -2
View File
@@ -1,11 +1,28 @@
name: Publish Docker image
on:
release:
types: [published]
types: [published, edited]
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:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
needs: build
steps:
- name: Get the version
id: vars
@@ -21,4 +38,4 @@ jobs:
- 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}}
- 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}}
+1 -1
View File
@@ -8,7 +8,7 @@ BIN = $(GOPATH)/bin
## Migration tool
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
installtools: | $(GOOSE)
+2 -2
View File
@@ -17,8 +17,8 @@ CREATE INDEX tx_dst_index ON eth.transaction_cids USING btree (dst);
CREATE INDEX tx_src_index ON eth.transaction_cids USING btree (src);
-- receipt indexes
CREATE UNIQUE INDEX rct_leaf_cid_index ON eth.receipt_cids USING btree (leaf_cid);
CREATE UNIQUE INDEX rct_leaf_mh_index ON eth.receipt_cids USING btree (leaf_mh_key);
CREATE INDEX rct_leaf_cid_index ON eth.receipt_cids USING btree (leaf_cid);
CREATE INDEX rct_leaf_mh_index ON eth.receipt_cids USING btree (leaf_mh_key);
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);
@@ -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;
@@ -1,4 +1,16 @@
-- +goose Up
ALTER TABLE public.nodes
ADD CONSTRAINT pk_public_nodes PRIMARY KEY (node_id);
ALTER TABLE eth.header_cids
ADD CONSTRAINT pk_eth_header_cids PRIMARY KEY (block_hash);
ALTER TABLE eth.uncle_cids
ADD CONSTRAINT pk_eth_uncle_cids PRIMARY KEY (block_hash);
ALTER TABLE eth.transaction_cids
ADD CONSTRAINT pk_eth_transaction_cids PRIMARY KEY (tx_hash);
ALTER TABLE eth.receipt_cids
ADD CONSTRAINT pk_eth_receipt_cids PRIMARY KEY (tx_id);
@@ -35,3 +47,15 @@ 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;
@@ -1,25 +0,0 @@
-- +goose Up
ALTER TABLE public.nodes
ADD CONSTRAINT pk_public_nodes PRIMARY KEY (node_id);
ALTER TABLE eth.header_cids
ADD CONSTRAINT pk_eth_header_cids PRIMARY KEY (block_hash);
ALTER TABLE eth.uncle_cids
ADD CONSTRAINT pk_eth_uncle_cids PRIMARY KEY (block_hash);
ALTER TABLE eth.transaction_cids
ADD CONSTRAINT pk_eth_transaction_cids PRIMARY KEY (tx_hash);
-- +goose Down
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;
@@ -17,8 +17,8 @@ CREATE INDEX tx_dst_index ON eth.transaction_cids USING btree (dst);
CREATE INDEX tx_src_index ON eth.transaction_cids USING btree (src);
-- receipt indexes
CREATE UNIQUE INDEX rct_leaf_cid_index ON eth.receipt_cids USING btree (leaf_cid);
CREATE UNIQUE INDEX rct_leaf_mh_index ON eth.receipt_cids USING btree (leaf_mh_key);
CREATE INDEX rct_leaf_cid_index ON eth.receipt_cids USING btree (leaf_cid);
CREATE INDEX rct_leaf_mh_index ON eth.receipt_cids USING btree (leaf_mh_key);
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);
+51 -4
View File
@@ -23,6 +23,13 @@ SET row_security = off;
CREATE SCHEMA eth;
--
-- Name: eth_meta; Type: SCHEMA; Schema: -; Owner: -
--
CREATE SCHEMA eth_meta;
SET default_tablespace = '';
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: -
--
@@ -562,6 +593,22 @@ ALTER TABLE ONLY eth.uncle_cids
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: -
--
@@ -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: -
--
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: -
--
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: -
--
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: -
--
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);
--