Skip to content
Open

Add #3167

Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ indexer:
port: "4000" # GRPC port of the Prysm node
type: "lighthouse" # can be either prysm or lighthouse
pageSize: 100 # the amount of entries to fetch per paged rpc call, TODO set to 500
eth1ErigonEndpoint: 'http://localhost:8545' # Added for Erigon RPC
eth1Endpoint: 'http://localhost:8545'
# Note: 0 is correct, but due to an underflow bug (being fixed), doesn't work.
eth1DepositContractFirstBlock: 1
2 changes: 1 addition & 1 deletion config/holesky.chain.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ PROPOSER_SCORE_BOOST: 40
# Ethereum
DEPOSIT_CHAIN_ID: 17000
DEPOSIT_NETWORK_ID: 17000
DEPOSIT_CONTRACT_ADDRESS: 0x4242424242424242424242424242424242424242
DEPOSIT_CONTRACT_ADDRESS: 0x06EE840642a33367ee59fCA237F270d5119d1356

# Sync committee
# ---------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion config/mekong.chain.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ REORG_MAX_EPOCHS_SINCE_FINALIZATION: 2
# ---------------------------------------------------------------
DEPOSIT_CHAIN_ID: 7078815900
DEPOSIT_NETWORK_ID: 7078815900
DEPOSIT_CONTRACT_ADDRESS: 0x4242424242424242424242424242424242424242
DEPOSIT_CONTRACT_ADDRESS: 0x06EE840642a33367ee59fCA237F270d5119d1356

# Networking
# ---------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion config/pectra-devnet-5.chain.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ REORG_MAX_EPOCHS_SINCE_FINALIZATION: 2
# ---------------------------------------------------------------
DEPOSIT_CHAIN_ID: 7088110746
DEPOSIT_NETWORK_ID: 7088110746
DEPOSIT_CONTRACT_ADDRESS: 0x4242424242424242424242424242424242424242
DEPOSIT_CONTRACT_ADDRESS: 0x06EE840642a33367ee59fCA237F270d5119d1356

# Networking
# ---------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion config/pectra-devnet-6.chain.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ REORG_MAX_EPOCHS_SINCE_FINALIZATION: 2
# ---------------------------------------------------------------
DEPOSIT_CHAIN_ID: 7072151312
DEPOSIT_NETWORK_ID: 7072151312
DEPOSIT_CONTRACT_ADDRESS: 0x4242424242424242424242424242424242424242
DEPOSIT_CONTRACT_ADDRESS: 0x06EE840642a33367ee59fCA237F270d5119d1356

# Networking
# ---------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion config/testnet.chain.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ PROPOSER_SCORE_BOOST: 40
# ---------------------------------------------------------------
DEPOSIT_CHAIN_ID: 1337803
DEPOSIT_NETWORK_ID: 1337803
DEPOSIT_CONTRACT_ADDRESS: 0x4242424242424242424242424242424242424242
DEPOSIT_CONTRACT_ADDRESS: 0x06EE840642a33367ee59fCA237F270d5119d1356
INACTIVITY_PENALTY_QUOTIENT_ALTAIR: 50331648
MIN_SLASHING_PENALTY_QUOTIENT_ALTAIR: 64
PROPORTIONAL_SLASHING_MULTIPLIER_ALTAIR: 2
Expand Down
25 changes: 25 additions & 0 deletions db/db.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,28 @@
// GetTrackedAddresses returns all addresses from the tracked_addresses table
func GetTrackedAddresses() []string {
rows, err := ReaderDb.Query("SELECT address FROM tracked_addresses")
if err != nil {
logger.Errorf("error querying tracked_addresses: %v", err)
return nil
}
defer rows.Close()
var addresses []string
for rows.Next() {
var addr string
if err := rows.Scan(&addr); err == nil {
addresses = append(addresses, addr)
}
}
return addresses
}

// UpdateAddressBalance updates the balance for an address in tracked_addresses
func UpdateAddressBalance(address string, balance string) {
_, err := WriterDb.Exec("UPDATE tracked_addresses SET balance = $1 WHERE address = $2", balance, address)
if err != nil {
logger.Errorf("error updating balance for %s: %v", address, err)
}
}
package db

import (
Expand Down
14 changes: 14 additions & 0 deletions db/migrations/20250922120000_create_tracked_addresses.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
-- +goose Up
-- +goose StatementBegin
SELECT('up SQL query - create tracked_addresses table');
CREATE TABLE IF NOT EXISTS tracked_addresses (
address TEXT PRIMARY KEY,
balance TEXT DEFAULT '0'
);
-- +goose StatementEnd

-- +goose Down
-- +goose StatementBegin
SELECT('down SQL query - drop tracked_addresses table');
DROP TABLE IF EXISTS tracked_addresses;
-- +goose StatementEnd
2 changes: 1 addition & 1 deletion eth2_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,4 @@ CHURN_LIMIT_QUOTIENT: 65536
# Custom Ethereum testnet
DEPOSIT_CHAIN_ID: 1337802
DEPOSIT_NETWORK_ID: 1337802
DEPOSIT_CONTRACT_ADDRESS: 0x4242424242424242424242424242424242424242
DEPOSIT_CONTRACT_ADDRESS: 0x06EE840642a33367ee59fCA237F270d5119d1356
19 changes: 2 additions & 17 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ require (
github.com/aybabtme/uniplot v0.0.0-20151203143629-039c559e5e7e
github.com/carlmjohnson/requests v0.23.4
github.com/davecgh/go-spew v1.1.1
github.com/doug-martin/goqu/v9 v9.19.0
github.com/ethereum/go-ethereum v1.14.6-0.20250124151602-75526bb8e01b
github.com/evanw/esbuild v0.8.23
github.com/go-redis/redis/v8 v8.11.5
Expand All @@ -36,11 +37,9 @@ require (
github.com/gorilla/websocket v1.5.3
github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d
github.com/jackc/pgx-shopspring-decimal v0.0.0-20220624020537-1d36b5a1853e
github.com/jackc/pgx/v4 v4.18.1
github.com/jackc/pgx/v5 v5.4.3
github.com/jmoiron/sqlx v1.2.0
github.com/juliangruber/go-intersect v1.1.0
github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5
github.com/kataras/i18n v0.0.5
github.com/kelseyhightower/envconfig v1.4.0
github.com/lib/pq v1.10.7
Expand All @@ -64,12 +63,12 @@ require (
github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e
github.com/skygeario/go-confusable-homoglyphs v0.0.0-20191212061114-e2b2a60df110
github.com/stripe/stripe-go/v72 v72.50.0
github.com/swaggo/swag v1.16.4
github.com/urfave/negroni v1.0.0
github.com/wealdtech/go-ens/v3 v3.6.0
github.com/wealdtech/go-eth2-types/v2 v2.8.1
github.com/wealdtech/go-eth2-util v1.8.1
github.com/zesik/proxyaddr v0.0.0-20161218060608-ec32c535184d
go.uber.org/atomic v1.11.0
golang.org/x/crypto v0.32.0
golang.org/x/sync v0.10.0
golang.org/x/text v0.21.0
Expand All @@ -96,7 +95,6 @@ require (
cloud.google.com/go/longrunning v0.6.4 // indirect
cloud.google.com/go/monitoring v1.22.1 // indirect
github.com/ClickHouse/ch-go v0.61.5 // indirect
github.com/KyleBanks/depth v1.2.1 // indirect
github.com/MicahParks/keyfunc v1.9.0 // indirect
github.com/Microsoft/go-winio v0.6.2 // indirect
github.com/VictoriaMetrics/fastcache v1.12.2 // indirect
Expand Down Expand Up @@ -125,8 +123,6 @@ require (
github.com/crate-crypto/go-kzg-4844 v1.1.0 // indirect
github.com/deckarep/golang-set/v2 v2.6.0 // indirect
github.com/dgraph-io/ristretto v0.1.1 // indirect
github.com/doug-martin/goqu v5.0.0+incompatible // indirect
github.com/doug-martin/goqu/v9 v9.19.0 // indirect
github.com/dustin/go-humanize v1.0.1 // indirect
github.com/envoyproxy/go-control-plane v0.13.1 // indirect
github.com/envoyproxy/protoc-gen-validate v1.1.0 // indirect
Expand All @@ -139,10 +135,6 @@ require (
github.com/go-faster/errors v0.7.1 // indirect
github.com/go-logr/logr v1.4.2 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-openapi/jsonpointer v0.20.2 // indirect
github.com/go-openapi/jsonreference v0.20.4 // indirect
github.com/go-openapi/spec v0.20.14 // indirect
github.com/go-openapi/swag v0.22.9 // indirect
github.com/goccy/go-json v0.10.2 // indirect
github.com/gofrs/flock v0.8.1 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
Expand All @@ -167,15 +159,10 @@ require (
github.com/ipfs/go-metrics-interface v0.0.1 // indirect
github.com/ipld/go-codec-dagpb v1.6.0 // indirect
github.com/ipld/go-ipld-prime v0.20.0 // indirect
github.com/jackc/chunkreader/v2 v2.0.1 // indirect
github.com/jackc/pgconn v1.14.0 // indirect
github.com/jackc/pgproto3/v2 v2.3.2 // indirect
github.com/jackc/pgx v3.6.2+incompatible // indirect
github.com/jackc/puddle/v2 v2.2.1 // indirect
github.com/jbenet/goprocess v0.1.4 // indirect
github.com/libp2p/go-buffer-pool v0.1.0 // indirect
github.com/mattn/go-runewidth v0.0.15 // indirect
github.com/mattn/go-sqlite3 v1.14.7 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/mmcloughlin/addchain v0.4.0 // indirect
github.com/mr-tron/base58 v1.2.0 // indirect
Expand Down Expand Up @@ -211,10 +198,8 @@ require (
go.opentelemetry.io/otel/sdk v1.31.0 // indirect
go.opentelemetry.io/otel/sdk/metric v1.31.0 // indirect
go.opentelemetry.io/otel/trace v1.31.0 // indirect
go.uber.org/atomic v1.11.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.27.0 // indirect
golang.org/x/tools v0.29.0 // indirect
google.golang.org/appengine/v2 v2.0.2 // indirect
google.golang.org/genproto v0.0.0-20241216192217-9240e9c98484 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20250115164207-1a7da9e5054f // indirect
Expand Down
Loading