Skip to content
This repository has been archived by the owner on Sep 28, 2021. It is now read-only.

Commit

Permalink
Merge pull request #66 from vulcanize/remove_tx_index
Browse files Browse the repository at this point in the history
Remove tx index
  • Loading branch information
i-norden authored Oct 21, 2020
2 parents 4d0edc4 + 603de03 commit 7cd80ef
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 18 deletions.
3 changes: 0 additions & 3 deletions db/migrations/00014_create_cid_indexes.sql
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ 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_data_index ON eth.transaction_cids USING btree (tx_data);

-- receipt indexes
CREATE INDEX rct_tx_id_index ON eth.receipt_cids USING btree (tx_id);

Expand Down Expand Up @@ -107,7 +105,6 @@ DROP INDEX eth.rct_cid_index;
DROP INDEX eth.rct_tx_id_index;

-- transaction indexes
DROP INDEX eth.tx_data_index;
DROP INDEX eth.tx_src_index;
DROP INDEX eth.tx_dst_index;
DROP INDEX eth.tx_mh_index;
Expand Down
7 changes: 0 additions & 7 deletions db/schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -886,13 +886,6 @@ CREATE INDEX timestamp_index ON eth.header_cids USING brin ("timestamp");
CREATE INDEX tx_cid_index ON eth.transaction_cids USING btree (cid);


--
-- Name: tx_data_index; Type: INDEX; Schema: eth; Owner: -
--

CREATE INDEX tx_data_index ON eth.transaction_cids USING btree (tx_data);


--
-- Name: tx_dst_index; Type: INDEX; Schema: eth; Owner: -
--
Expand Down
2 changes: 1 addition & 1 deletion pkg/eth/streamer.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
)

const (
PayloadChanBufferSize = 20000 // the max eth sub buffer size
PayloadChanBufferSize = 10000 // half the max eth sub buffer size
)

// StreamClient is an interface for subscribing and streaming from geth
Expand Down
2 changes: 1 addition & 1 deletion pkg/eth/transformer.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ func (sdt *StateDiffTransformer) Transform(workerID int, payload statediff.Paylo
traceMsg += fmt.Sprintf("postgres transaction commit duration: %s\r\n", tDiff.String())
}
traceMsg += fmt.Sprintf(" TOTAL PROCESSING TIME: %s\r\n", time.Now().Sub(start).String())
logrus.Info(traceMsg)
logrus.Trace(traceMsg)
}()
tDiff = time.Now().Sub(t)
prom.SetTimeMetric("t_free_postgres", tDiff)
Expand Down
6 changes: 1 addition & 5 deletions pkg/sync/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,6 @@ import (
"github.com/vulcanize/ipld-eth-indexer/pkg/shared"
)

const (
PayloadChanBufferSize = 2000
)

// Indexer is the top level interface for streaming, converting to IPLDs, publishing, and indexing all chain data at head
// This service is compatible with the Ethereum service interface (node.Service)
type Indexer interface {
Expand Down Expand Up @@ -97,7 +93,7 @@ func (sap *Service) Sync(wg *sync.WaitGroup) error {
return err
}
// spin up publish worker goroutines
publishPayload := make(chan statediff.Payload, PayloadChanBufferSize)
publishPayload := make(chan statediff.Payload, eth.PayloadChanBufferSize)
for i := 1; i <= int(sap.Workers); i++ {
go sap.transform(wg, i, publishPayload)
log.Debugf("ethereum sync worker %d successfully spun up", i)
Expand Down
2 changes: 1 addition & 1 deletion version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import "fmt"

const (
Major = 0 // Major version component of the current release
Minor = 5 // Minor version component of the current release
Minor = 6 // Minor version component of the current release
Patch = 0 // Patch version component of the current release
Meta = "alpha" // Version metadata to append to the version string
)
Expand Down

0 comments on commit 7cd80ef

Please sign in to comment.