From 421987ff72b2dfc6d7b2ff2703372ede27e7bbe9 Mon Sep 17 00:00:00 2001 From: Ian Norden Date: Thu, 21 May 2020 15:58:07 -0500 Subject: [PATCH] update version in go.mod --- cmd/superNode.go | 1 - go.mod | 2 +- go.sum | 2 ++ pkg/eth/trie_validator/service.go | 17 ----------------- pkg/super_node/backfiller.go | 10 +++++----- 5 files changed, 8 insertions(+), 24 deletions(-) delete mode 100644 pkg/eth/trie_validator/service.go diff --git a/cmd/superNode.go b/cmd/superNode.go index 0128437f..a72dd6a9 100644 --- a/cmd/superNode.go +++ b/cmd/superNode.go @@ -72,7 +72,6 @@ func superNode() { if err != nil { logWithCommand.Fatal(err) } - defer superNode.Stop() var forwardPayloadChan chan shared.ConvertedData if superNodeConfig.Serve { logWithCommand.Info("starting up super node servers") diff --git a/go.mod b/go.mod index 116cca35..6ba1ac6b 100644 --- a/go.mod +++ b/go.mod @@ -98,4 +98,4 @@ replace github.com/ipfs/go-ipfs v0.4.22 => github.com/vulcanize/go-ipfs v0.4.22- replace github.com/ipfs/go-ipfs-config v0.0.3 => github.com/vulcanize/go-ipfs-config v0.0.8-alpha -replace github.com/ethereum/go-ethereum v1.9.1 => github.com/vulcanize/go-ethereum v1.5.10-0.20200311182536-d07dc803d290 +replace github.com/ethereum/go-ethereum v1.9.1 => github.com/vulcanize/go-ethereum v1.9.11-statediff-0.0.2 diff --git a/go.sum b/go.sum index ea4249a2..7000ae8f 100644 --- a/go.sum +++ b/go.sum @@ -692,6 +692,8 @@ github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljT github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/vulcanize/go-ethereum v1.5.10-0.20200311182536-d07dc803d290 h1:uMWt+x6JhVT7GyL983weZSxv1zDBxvGlI9HNkcTnUeg= github.com/vulcanize/go-ethereum v1.5.10-0.20200311182536-d07dc803d290/go.mod h1:7oC0Ni6dosMv5pxMigm6s0hN8g4haJMBnqmmo0D9YfQ= +github.com/vulcanize/go-ethereum v1.9.11-statediff-0.0.2 h1:ebv2bWocCmNKGnpHtRjSWoTpkgyEbRBb028PanH43H8= +github.com/vulcanize/go-ethereum v1.9.11-statediff-0.0.2/go.mod h1:7oC0Ni6dosMv5pxMigm6s0hN8g4haJMBnqmmo0D9YfQ= github.com/vulcanize/go-ipfs v0.4.22-alpha h1:W+6njT14KWllMhABRFtPndqHw8SHCt5SqD4YX528kxM= github.com/vulcanize/go-ipfs v0.4.22-alpha/go.mod h1:uaekWWeoaA0A9Dv1LObOKCSh9kIzTpZ5RbKW4g5CQHE= github.com/vulcanize/go-ipfs-config v0.0.8-alpha h1:peaFvbEcPShF6ymOd8flqKkFz4YfcrNr/UOO7FmbWoQ= diff --git a/pkg/eth/trie_validator/service.go b/pkg/eth/trie_validator/service.go deleted file mode 100644 index 25f93839..00000000 --- a/pkg/eth/trie_validator/service.go +++ /dev/null @@ -1,17 +0,0 @@ -// VulcanizeDB -// Copyright © 2019 Vulcanize - -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. - -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see . - -package trie_validator diff --git a/pkg/super_node/backfiller.go b/pkg/super_node/backfiller.go index ec227f9a..588a9961 100644 --- a/pkg/super_node/backfiller.go +++ b/pkg/super_node/backfiller.go @@ -124,6 +124,11 @@ func (bfs *BackFillService) BackFill(wg *sync.WaitGroup) { log.Infof("quiting %s FillGapsInSuperNode process", bfs.chain.String()) return case <-ticker.C: + gaps, err := bfs.Retriever.RetrieveGapsInData(bfs.validationLevel) + if err != nil { + log.Errorf("%s super node db backFill RetrieveGapsInData error: %v", bfs.chain.String(), err) + continue + } // spin up worker goroutines for this search pass // we start and kill a new batch of workers for each pass // so that we know each of the previous workers is done before we search for new gaps @@ -131,11 +136,6 @@ func (bfs *BackFillService) BackFill(wg *sync.WaitGroup) { for i := 1; i <= int(bfs.BatchNumber); i++ { go bfs.backFill(wg, i, heightsChan) } - gaps, err := bfs.Retriever.RetrieveGapsInData(bfs.validationLevel) - if err != nil { - log.Errorf("%s super node db backFill RetrieveGapsInData error: %v", bfs.chain.String(), err) - continue - } for _, gap := range gaps { log.Infof("backFilling %s data from %d to %d", bfs.chain.String(), gap.Start, gap.Stop) blockRangeBins, err := utils.GetBlockHeightBins(gap.Start, gap.Stop, bfs.BatchSize)