-
Notifications
You must be signed in to change notification settings - Fork 441
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(BEDS-536): add
re-index-blocks
cmd to fix internal transfers s…
…tatus (#2965) * fix(internal transaction): recursively revert traces * fix: SQLReaderDb interface missing methods * fix(eth1tx): remove transfers if reverted * fix(internal tx): only save the highest root revert * ci lint * feat: updated eth1 proto file * feat: updated Eth1InternalTransaction in eth1.proto file * feat: added Reverted value to Eth1InternalTransactionIndexed * feat: add check for internal txs while querying the block from erigon node and set the status to 2 if tx has failed partially * feat: updated reverted internal txs check logic * feat(types): add status enum and add status partially executed * refactor(client/erigon): simplify transaction indexing flow * feat(client/erigon): rework geth traces * fix: lint * feat: add status to Eth1TransactionIndexed msg and update hash formatting * fix: updated internal tx handling in GetBlock func * fix: updated internal txs parsing in GetBlock * fix: optimise the memory of internla tx parsing * lint * fix(internal): remove revert + status logic from client to transformers * test(internal): test for revert transformer on tx and itx * feat(cmd): add re-index-blocks cmd * chore(proto): clean proto Eth1Transaction and Eth1TransactionIndexed * fix(TransformItx): empty revertSource + error before skipping * feat(BEDS-536): implement misc `fix-internal-txs-from-node` cmd with batch processing from Erigon node (#2967) * wip: move itx status parsing logic to transformers func * wip: implementing fix-internal-txs misc cmd * wip: updated geth client initialisation * wip: moved blocks by batch logic to erigon.go * wip: updated block by number batch call * updated blocks batch processing * feat: added transformers for bulk mutations * fix: save current block height in local variable when performing mutation of the block data * fix: add check for start and end block flags * fix: updated erigon client * fix: add check for batchcall size and return if it's empty * cleanup unused code * cleanup * updated cmd name to fix-internal-txs-from-node * fix: uncles, blobGasUsed & excessBlobGas parsing * rm timings, update GetBlocksByBatch func * fix: revised ReindexITxsFromNode func logic * fix: update the logic for parsing uncles, BlobGasUsed and ExcessBlobGas * (BEDS-536) Use raw db for resync (#2972) * rpc/erigon: use raw bigtable * rpc/erigon: use cache raw db * rpc/erigon: correct path for geth traces * cmd/reindex: improve performance + fix raw store cache * rpc/erigon: fix sender address * db2/store: add remote server + client * fix ci * store/bigtable: fix range limits go mod * store/bigtable: fix grpc error on close * updated Receipts len check * updated traceMode to geth * fix ci * clenup * rpc/erigon: parse traces geth handle CALLCODE * fix(transform itx): allow internal index == ITX_PER_TX_LIMIT * fix(bigtable): retry on grpc internal err * fix(re index): log error rather than returning error and panicking * feat(re index): re print read error at the end * fix(TransformEnsNameRegistered): return none nil if ignored chainID * fix(db2/WithFallback): fallback on syscall.ECONNRESET * fix(blockHash): prevent wrong calculated hash * fix: return error if mismatch between receipts and transactions length * fix: blockhash read from node response * fix: merge go mod --------- Co-authored-by: Monika-Bitfly <[email protected]> Co-authored-by: Patrick Pfeiffer <[email protected]>
- Loading branch information
1 parent
07d8905
commit a073010
Showing
37 changed files
with
4,639 additions
and
989 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package main | ||
|
||
import ( | ||
"errors" | ||
"flag" | ||
"net/http" | ||
|
||
"github.com/sirupsen/logrus" | ||
|
||
"github.com/gobitfly/eth2-beaconchain-explorer/db2" | ||
"github.com/gobitfly/eth2-beaconchain-explorer/db2/store" | ||
"github.com/gobitfly/eth2-beaconchain-explorer/types" | ||
"github.com/gobitfly/eth2-beaconchain-explorer/utils" | ||
) | ||
|
||
func main() { | ||
configPath := flag.String("config", "config/default.config.yml", "Path to the config file") | ||
flag.Parse() | ||
|
||
cfg := &types.Config{} | ||
err := utils.ReadConfig(cfg, *configPath) | ||
if err != nil { | ||
panic(err) | ||
} | ||
|
||
bt, err := store.NewBigTable(cfg.RawBigtable.Bigtable.Project, cfg.RawBigtable.Bigtable.Instance, nil) | ||
if err != nil { | ||
panic(err) | ||
} | ||
remote := store.NewRemoteStore(store.Wrap(bt, db2.BlocksRawTable, "")) | ||
go func() { | ||
logrus.Info("starting remote raw store on port 8087") | ||
if err := http.ListenAndServe("0.0.0.0:8087", remote.Routes()); err != nil && !errors.Is(err, http.ErrServerClosed) { | ||
panic(err) | ||
} | ||
}() | ||
utils.WaitForCtrlC() | ||
} |
Oops, something went wrong.