Skip to content

Commit

Permalink
Merge pull request #217 from vulcanize/feature/known-gaps
Browse files Browse the repository at this point in the history
Feature/known gaps
  • Loading branch information
abdulrabbani00 authored Mar 31, 2022
2 parents 3045068 + d24a49e commit c8b68db
Show file tree
Hide file tree
Showing 34 changed files with 686 additions and 480 deletions.
1 change: 1 addition & 0 deletions .github/workflows/on-master.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Docker Build and publish to Github

on:
workflow_dispatch:
push:
branches:
- statediff
Expand Down
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,11 @@ profile.cov
**/yarn-error.log
foundry/deployments/local-private-network/geth-linux-amd64
foundry/projects/local-private-network/geth-linux-amd64

# Helpful repos
related-repositories/foundry-test/**
related-repositories/hive/**
related-repositories/ipld-eth-db/**
statediff/indexer/database/sql/statediffing_test_file.sql
statediff/statediffing_test_file.sql
statediff/known_gaps.sql
5 changes: 1 addition & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,4 @@
[submodule "evm-benchmarks"]
path = tests/evm-benchmarks
url = https://github.com/ipsilon/evm-benchmarks
shallow = true
[submodule "foundry/projects/local-private-network/Stateful/lib/ds-test"]
path = foundry/projects/local-private-network/Stateful/lib/ds-test
url = https://github.com/dapphub/ds-test
shallow = true
15 changes: 8 additions & 7 deletions cmd/geth/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -252,13 +252,14 @@ func makeFullNode(ctx *cli.Context) (*node.Node, ethapi.Backend) {
}
}
p := statediff.Config{
IndexerConfig: indexerConfig,
ID: nodeID,
ClientName: clientName,
Context: context.Background(),
EnableWriteLoop: ctx.GlobalBool(utils.StateDiffWritingFlag.Name),
NumWorkers: ctx.GlobalUint(utils.StateDiffWorkersFlag.Name),
WaitForSync: ctx.GlobalBool(utils.StateDiffWaitForSync.Name),
IndexerConfig: indexerConfig,
KnownGapsFilePath: ctx.GlobalString(utils.StateDiffKnownGapsFilePath.Name),
ID: nodeID,
ClientName: clientName,
Context: context.Background(),
EnableWriteLoop: ctx.GlobalBool(utils.StateDiffWritingFlag.Name),
NumWorkers: ctx.GlobalUint(utils.StateDiffWorkersFlag.Name),
WaitForSync: ctx.GlobalBool(utils.StateDiffWaitForSync.Name),
}
utils.RegisterStateDiffService(stack, eth, &cfg.Eth, p, backend)
}
Expand Down
1 change: 1 addition & 0 deletions cmd/geth/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ var (
utils.StateDiffWritingFlag,
utils.StateDiffWorkersFlag,
utils.StateDiffFilePath,
utils.StateDiffKnownGapsFilePath,
utils.StateDiffWaitForSync,
configFileFlag,
}
Expand Down
1 change: 1 addition & 0 deletions cmd/geth/usage.go
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ var AppHelpFlagGroups = []flags.FlagGroup{
utils.StateDiffWritingFlag,
utils.StateDiffWorkersFlag,
utils.StateDiffFilePath,
utils.StateDiffKnownGapsFilePath,
utils.StateDiffWaitForSync,
},
},
Expand Down
5 changes: 5 additions & 0 deletions cmd/utils/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -867,6 +867,11 @@ var (
Name: "statediff.file.path",
Usage: "Full path (including filename) to write statediff data out to when operating in file mode",
}
StateDiffKnownGapsFilePath = cli.StringFlag{
Name: "statediff.knowngapsfile.path",
Usage: "Full path (including filename) to write knownGaps statements when the DB is unavailable.",
Value: "./known_gaps.sql",
}
StateDiffDBClientNameFlag = cli.StringFlag{
Name: "statediff.db.clientname",
Usage: "Client name to use when writing state diffs to database",
Expand Down
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
version: '3.2'
version: "3.2"

services:
ipld-eth-db:
restart: always
image: vulcanize/ipld-eth-db:v0.3.1
image: vulcanize/ipld-eth-db:v3.2.0
environment:
POSTGRES_USER: "vdbm"
POSTGRES_DB: "vulcanize_testing_v3"
Expand Down
59 changes: 0 additions & 59 deletions foundry/README.md

This file was deleted.

37 changes: 0 additions & 37 deletions foundry/projects/local-private-network/Dockerfile

This file was deleted.

Submodule ds-test deleted from 0a5da5
16 changes: 0 additions & 16 deletions foundry/projects/local-private-network/compile-geth.sh

This file was deleted.

Loading

0 comments on commit c8b68db

Please sign in to comment.