Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bids 2379/new bigtable cl schema #2490

Merged
merged 109 commits into from
Sep 12, 2023
Merged
Show file tree
Hide file tree
Changes from 98 commits
Commits
Show all changes
109 commits
Select commit Hold shift + click to select a range
0d382f0
(BIDS-2379) implement new bigtable cl schema
peterbitfly Aug 21, 2023
f0364c5
(BIDS-2379) implement parallel fetching for all cl bigtable read requ…
peterbitfly Aug 21, 2023
3309967
(BIDS-2379) add bigtable schema migration function
peterbitfly Aug 24, 2023
7478a91
(BIDS-2379) fix attestation slot parsing
peterbitfly Aug 28, 2023
31ad6e7
(BIDS-2379) fix staticchheck
peterbitfly Aug 28, 2023
4b3069c
(BIDS-2379) update bigtable config
peterbitfly Aug 28, 2023
b3a618f
(BIDS-2379) update bigtable config
peterbitfly Aug 28, 2023
a33d3c0
(BIDS-2379) update bigtable config
peterbitfly Aug 28, 2023
6980ca6
(BIDS-2379) update bigtable schema
peterbitfly Aug 28, 2023
344a8b2
(BIDS-2379) increase timeouts
peterbitfly Aug 30, 2023
b3b12d0
(BIDS-2379) promote exportSyncCommitteesCount error to error level
peterbitfly Aug 30, 2023
12a6acb
(BIDS-2379) add instructions for a local testnet deployment
peterbitfly Aug 30, 2023
1496ddc
(BIDS-2379) add config
peterbitfly Aug 30, 2023
80c1a31
(BIDS-2379) fix config file
peterbitfly Aug 30, 2023
cf8908c
(BIDS-2379) fix config
peterbitfly Aug 30, 2023
41cda79
(BIDS-2379) update testnet config
peterbitfly Aug 30, 2023
d2e71fe
(BIDS-2379) update config
peterbitfly Aug 30, 2023
02739fa
(BIDS-2379) update config
peterbitfly Aug 30, 2023
9e6a82b
(BIDS-2379) do not crash on txpool_content error
peterbitfly Aug 30, 2023
608a593
(BIDS-2379) add frontend config
peterbitfly Aug 30, 2023
0361765
(BIDS-2379) update config
peterbitfly Aug 30, 2023
0ed588a
(BIDS-2379) update frontend config
peterbitfly Aug 30, 2023
36ce5c3
(BIDS-2379) add utility to convert lh testnet config stub to full config
peterbitfly Aug 30, 2023
9b863ed
(BIDS-2379) update default config path
peterbitfly Aug 30, 2023
a28e188
(BIDS-2379) update local guide
peterbitfly Aug 30, 2023
9e46c8c
(BIDS-2379) improve local deplyoment setup
peterbitfly Aug 31, 2023
5087774
(BIDS-2379) improve uint parsing
peterbitfly Aug 31, 2023
f9c90cc
(BIDS-2379) improve logging
peterbitfly Aug 31, 2023
8b2bf4e
(BIDS-2379) fix genesis ts parsing
peterbitfly Aug 31, 2023
d029fde
(BIDS-2379) fix genesis ts formatting
peterbitfly Aug 31, 2023
b536000
(BIDS-2379) add genesis validator root provided by node
peterbitfly Aug 31, 2023
3df4277
(BIDS-2379) improve config handling
peterbitfly Aug 31, 2023
db296f8
(BIDS-2379) update readme
peterbitfly Aug 31, 2023
9dcd8c4
(BIDS-2379) adjust frontend start parameters
peterbitfly Aug 31, 2023
0c96401
(BIDS-2379) fix tracing of genesis block
peterbitfly Aug 31, 2023
872bb2e
(BIDS-2379) simplify local deployment
peterbitfly Aug 31, 2023
5f56e4c
(BIDS-2379) update config
peterbitfly Aug 31, 2023
b4b6179
(BIDS-2379) add tx spammer to local depyloment
peterbitfly Aug 31, 2023
c58324f
(BIDS-2379) remove obsole bigtable init file
peterbitfly Aug 31, 2023
61063f6
(BIDS-2379) fix genesis balance export
peterbitfly Aug 31, 2023
2fba664
(BIDS-2379) eth1index to use config node url as fallback
peterbitfly Aug 31, 2023
8fc3560
(BIDS-2379) fix parsing of geth style traces
peterbitfly Aug 31, 2023
2ad1b6d
(BIDS-2379) configure geth as archive node for local deployments
peterbitfly Aug 31, 2023
5b76b85
(BIDS-2379) add eth1indexer instructions
peterbitfly Aug 31, 2023
69c8054
(BIDS-2379) fix frontend start command
peterbitfly Aug 31, 2023
bb7ec47
(BIDS-2379) simplify service startup
peterbitfly Aug 31, 2023
fcdf150
(BIDS-2379) implement fallback nodes for rewards exporter, add reward…
peterbitfly Aug 31, 2023
08870df
(BIDS-2379) update local deployment guide
peterbitfly Aug 31, 2023
11e9a87
(BIDS-2379) add statistics to docker compose
peterbitfly Aug 31, 2023
71a38c2
(BIDS-2379) improved config
peterbitfly Aug 31, 2023
f9827c9
(BIDS-2379) Merge branch 'master' into BIDS-2379/new_bigtable_cl_schema
peterbitfly Aug 31, 2023
1f38231
(BIDS-2379) address cr issues
peterbitfly Aug 31, 2023
3267c46
(BIDS-2379) address cr issues
peterbitfly Aug 31, 2023
be83f20
(BIDS-2379) update ci to go v1.20
peterbitfly Aug 31, 2023
8a1caa4
(BIDS-2379) fix go vet
peterbitfly Aug 31, 2023
d7b8ffc
(BIDS-2379) fix underflow when loading epoch reward details
peterbitfly Aug 31, 2023
83cb153
(BIDS-2379) remove debug log
peterbitfly Aug 31, 2023
7a203dc
(BIDS-2379) please linter
peterbitfly Aug 31, 2023
134da85
(BIDS-2379) update ci
peterbitfly Aug 31, 2023
ef3abbe
(BIDS-2379) update ci
peterbitfly Aug 31, 2023
4b48e05
(BIDS-2379) update ci
peterbitfly Aug 31, 2023
d74388f
(BIDS-2379) update ci
peterbitfly Aug 31, 2023
a1535cc
(BIDS-2379) store max validator index with a balance at a given epoch
peterbitfly Aug 31, 2023
ff41a06
(BIDS-2379) improve docker build speed, allow to specify evm trace mo…
peterbitfly Aug 31, 2023
173b630
(BIDS-2379) fix build errors
peterbitfly Aug 31, 2023
6d5a7b9
(BIDS-2379) update bigtable config doc
peterbitfly Aug 31, 2023
79b8753
(BIDS-2379) handle income for new chains correctly, remove obsole big…
peterbitfly Sep 1, 2023
62d32b4
(BIDS-2379) fix staticcheck errors
peterbitfly Sep 1, 2023
d76c0fb
(BIDS-2379) fix build error
peterbitfly Sep 1, 2023
73a26f2
(BIDS-2379) fix build error
peterbitfly Sep 1, 2023
cead20f
(BIDS-2379) simplify bigtable schema init in local deployments
peterbitfly Sep 4, 2023
b5869f9
(BIDS-2379) add standalone kurtosis module
peterbitfly Sep 4, 2023
b914bfa
(BIDS-2379) fix error for non-existing config.yml file during first l…
peterbitfly Sep 4, 2023
3f42795
(BIDS-2379) speed up startup of local dev instance
peterbitfly Sep 5, 2023
87aaee5
(BIDS-2379) make starting the tx spammer configurable
peterbitfly Sep 5, 2023
54626c7
(BIDS-2379) fix statistics
peterbitfly Sep 5, 2023
ef0180f
(BIDS-2379) rework exporter to skip exporting advance duties, reduce …
peterbitfly Sep 6, 2023
2697d97
(BIDS-2379) add helper script to exit validators for local devnets
peterbitfly Sep 6, 2023
7fd95f4
(BIDS-2379) adds scripts for withdrawing, exiting & depositing valida…
peterbitfly Sep 6, 2023
fd848ff
(BIDS-2379) fix uint64 underflow during epoch 0
peterbitfly Sep 7, 2023
7bbda4b
(BIDS-2379) rework bigtable schema to consolidate validator history d…
peterbitfly Sep 9, 2023
2e844eb
(BIDS-2379) fix build error
peterbitfly Sep 9, 2023
a3fb1f1
(BIDS-2379) use latest finalized epoch to derive the current sync period
peterbitfly Sep 9, 2023
e7affcb
(BIDS-2379) remove leftover log statements
peterbitfly Sep 9, 2023
be7299f
(BIDS-2379) fix sync duties table
peterbitfly Sep 9, 2023
134e132
(BIDS-2379) remove log message
peterbitfly Sep 9, 2023
296d44b
(BIDS-2379) fix epoch finalization & sync committee page issues
peterbitfly Sep 11, 2023
e911172
(BIDS-2379) disable ordering of the sync duties table
peterbitfly Sep 11, 2023
b01ffb9
(BIDS-2379) support reading config file location from an env variable
peterbitfly Sep 11, 2023
6cc148e
(BIDS-2379) Merge branch 'master' into BIDS-2379/new_bigtable_cl_schema
peterbitfly Sep 11, 2023
5ca0911
(BIDS-2379) fix build errors
peterbitfly Sep 11, 2023
26a4462
(BIDS-2379) fix linter
peterbitfly Sep 11, 2023
911181f
(BIDS-2379) add instrumentation for bigtable calls, fix excessive big…
peterbitfly Sep 11, 2023
2f23ca7
(BIDS-2379) remove debug logging
peterbitfly Sep 11, 2023
87af685
(BIDS-2379) fix linter
peterbitfly Sep 11, 2023
a2b491e
(BIDS-2379) add new bigtable schema migration tool
peterbitfly Sep 11, 2023
1f30fcc
(BIDS-2379) update types
peterbitfly Sep 11, 2023
150bfa8
(BIDS-2379) use correct constant for reversedPaddedEpoch
peterbitfly Sep 11, 2023
d3072f3
(BIDS-2379) remove dependency on the fdu for the explorer
peterbitfly Sep 11, 2023
4cd0f4c
(BIDS-2379) fix wrong index
peterbitfly Sep 11, 2023
4a60c6e
(BIDS-2379) address cr issues
peterbitfly Sep 12, 2023
17618d8
(BIDS-2379) improve map allocations
peterbitfly Sep 12, 2023
e4fc24d
(BIDS-2379) add holesky config
peterbitfly Sep 12, 2023
0055283
(BIDS-2379) add holesky chain config
peterbitfly Sep 12, 2023
25e9cac
(BIDS-2379) Merge branch 'master' into BIDS-2379/new_bigtable_cl_schema
peterbitfly Sep 12, 2023
e536a0d
(BIDS-2379) update dependencies
peterbitfly Sep 12, 2023
4f5f228
(BIDS-2379) adjust the effective & balance distribution chart to sour…
peterbitfly Sep 12, 2023
e213560
(BIDS-2379) improve fetching the last block of the data table
peterbitfly Sep 12, 2023
a4a2c70
(BIDS-2379) split max block number for el and cl blocks
peterbitfly Sep 12, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,17 @@ jobs:
name: Build
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.18
uses: actions/setup-go@v3
- name: Check out code into the Go module directory
uses: actions/checkout@v3

- name: Set up Go 1.20
uses: actions/setup-go@v4
with:
go-version: 1.18
go-version-file: './go.mod'
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v3
- name: Output go version
run: go version

- name: Check gofmt
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/staticcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
fail-fast: false
matrix:
os: ["ubuntu-latest"]
go: ["1.18.x"]
go: ["1.20.x"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v1
Expand All @@ -31,6 +31,6 @@ jobs:
- run: "go vet ./..."
- uses: dominikh/[email protected]
with:
version: "2022.1.1"
version: "2023.1.5"
install-go: false
cache-key: ${{ matrix.go }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,4 @@ lastAttestationCache
cmd/forkwatch
**/.DS_Store
_gitignore/
local-deployment/config.yml
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# The dockerfile is currently still WIP and might be broken
FROM golang:1.18 AS build-env
FROM golang:1.20 AS build-env
COPY go.mod go.sum /src/
WORKDIR /src
RUN go mod download
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ BUILDDATE=`date -u +"%Y-%m-%dT%H:%M:%S%:z"`
PACKAGE=eth2-exporter
LDFLAGS="-X ${PACKAGE}/version.Version=${VERSION} -X ${PACKAGE}/version.BuildDate=${BUILDDATE} -X ${PACKAGE}/version.GitCommit=${GITCOMMIT} -X ${PACKAGE}/version.GitDate=${GITDATE} -s -w"

all: explorer stats frontend-data-updater eth1indexer ethstore-exporter rewards-exporter node-jobs-processor signatures notification-sender notification-collector
all: explorer stats frontend-data-updater eth1indexer ethstore-exporter rewards-exporter node-jobs-processor signatures notification-sender notification-collector misc

lint:
golint ./...
Expand Down
96 changes: 83 additions & 13 deletions bigtable_config.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,52 +2,101 @@
This document summarized the bigtable configuration options and table definitions required to run the beaconcha.in explorer. All settings can be applied either by using the GCP bigtable web interface or the `cbt` tool.

----
Table name: `beaconchain`
Table name: `beaconchain_validator_history`

```
cbt -project $PROJECT -instance $INSTANCE createtable beaconchain_validator_history
```

Column families:
* Name: `at` | GC Policy: Version based policy with a maximum of 1 versions
* Name: `vb` | GC Policy: None
peterbitfly marked this conversation as resolved.
Show resolved Hide resolved
* Name: `ha` | GC Policy: None
* Name: `at` | GC Policy: None
* Name: `pr` | GC Policy: None
* Name: `sc` | GC Policy: None
peterbitfly marked this conversation as resolved.
Show resolved Hide resolved
* Name: `sp` | GC Policy: None
* Name: `id` | GC Policy: None
* Name: `pr` | GC Policy: Version based policy with a maximum of 1 versions
* Name: `sc` | GC Policy: Version based policy with a maximum of 1 versions
* Name: `stats` | GC Policy: None
* Name: `vb` | GC Policy: None

```
cbt -project $PROJECT -instance $INSTANCE createfamily beaconchain_validator_history vb
cbt -project $PROJECT -instance $INSTANCE createfamily beaconchain_validator_history ha
cbt -project $PROJECT -instance $INSTANCE createfamily beaconchain_validator_history at
cbt -project $PROJECT -instance $INSTANCE createfamily beaconchain_validator_history pr
cbt -project $PROJECT -instance $INSTANCE createfamily beaconchain_validator_history sc
cbt -project $PROJECT -instance $INSTANCE createfamily beaconchain_validator_history sp
cbt -project $PROJECT -instance $INSTANCE createfamily beaconchain_validator_history id
cbt -project $PROJECT -instance $INSTANCE createfamily beaconchain_validator_history stats
```
----
Table name: `beaconchain_validators`

```
cbt -project $PROJECT -instance $INSTANCE createtable beaconchain_validators
```

Column families:
* Name: `at` | GC Policy: Version based policy with a maximum of 1 versions

```
cbt -project $PROJECT -instance $INSTANCE createfamily beaconchain_validators at

cbt -project $PROJECT -instance $INSTANCE setgcpolicy beaconchain_validators at maxversions=1
```
----
Table name: `blocks`

```
cbt -project $PROJECT -instance $INSTANCE createtable blocks
```

Column families:
* Name: `default` | GC Policy: Version based policy with a maximum of 1 versions

----
Table name: `cache`

Column families:
* Name: `10_min` | GC Policy: Version based policy with a maximum of 1 versions and a maximum age of 10 minutes
* Name: `1_day` | GC Policy: Version based policy with a maximum of 1 versions and a maximum age of 1 day
* Name: `1_hour` | GC Policy: Version based policy with a maximum of 1 versions and a maximum age of 1 hour
```
cbt -project $PROJECT -instance $INSTANCE createfamily blocks default

cbt -project $PROJECT -instance $INSTANCE setgcpolicy blocks default maxversions=1
```
----
Table name: `data`

```
cbt -project $PROJECT -instance $INSTANCE createtable data
```

Column families:
* Name: `c` | GC Policy: Age based policy with a max age of 1 day
* Name: `f` | GC Policy: None

```
cbt -project $PROJECT -instance $INSTANCE createfamily data c
cbt -project $PROJECT -instance $INSTANCE createfamily data f

cbt -project $PROJECT -instance $INSTANCE setgcpolicy data c maxage=1d
```
----
Table name: `machine_metrics`

```
cbt -project $PROJECT -instance $INSTANCE createtable machine_metrics
```

Column families:
* Name: `mm` | GC Policy: Age based policy with a max age of 31 days

```
cbt -project $PROJECT -instance $INSTANCE createfamily machine_metrics mm

cbt -project $PROJECT -instance $INSTANCE setgcpolicy machine_metrics mm maxage=31d
```
----
Table name: `metadata`

```
cbt -project $PROJECT -instance $INSTANCE createtable metadata
```

Column families:
* Name: `a` | GC Policy: None
* Name: `c` | GC Policy: None
Expand All @@ -56,9 +105,30 @@ Column families:
* Name: `erc721` | GC Policy: None
* Name: `series` | GC Policy: Version based policy with a maximum of 1 versions

```
cbt -project $PROJECT -instance $INSTANCE createfamily metadata a
cbt -project $PROJECT -instance $INSTANCE createfamily metadata c
cbt -project $PROJECT -instance $INSTANCE createfamily metadata erc1155
cbt -project $PROJECT -instance $INSTANCE createfamily metadata erc20
cbt -project $PROJECT -instance $INSTANCE createfamily metadata erc721
cbt -project $PROJECT -instance $INSTANCE createfamily metadata series

cbt -project $PROJECT -instance $INSTANCE setgcpolicy metadata series maxversions=1
```
----
Table name: `metadata_updates`

```
cbt -project $PROJECT -instance $INSTANCE createtable metadata_updates
```

Column families:
* Name: `blocks` | GC Policy: Age based policy with a max age of 1 day
* Name: `f` | GC Policy: None
* Name: `f` | GC Policy: None

```
cbt -project $PROJECT -instance $INSTANCE createfamily metadata_updates blocks
cbt -project $PROJECT -instance $INSTANCE createfamily metadata_updates f

cbt -project $PROJECT -instance $INSTANCE setgcpolicy metadata_updates blocks maxage=1d
```
Loading
Loading