Skip to content
Merged
Show file tree
Hide file tree
Changes from 84 commits
Commits
Show all changes
85 commits
Select commit Hold shift + click to select a range
0761c4f
redo committer
nischitpra Sep 10, 2025
5e0891d
a
nischitpra Sep 10, 2025
5c67d50
committer redo
nischitpra Sep 10, 2025
72a3824
commit blocks in stream
nischitpra Sep 10, 2025
cc4c7be
minor change
nischitpra Sep 10, 2025
af465ef
minor change
nischitpra Sep 10, 2025
ba8846e
publish block range to kafka
nischitpra Sep 10, 2025
5dd4004
clear memory array
nischitpra Sep 10, 2025
3719824
debug logs
nischitpra Sep 10, 2025
00ce565
minor change
nischitpra Sep 10, 2025
12e2005
clear blockrange
nischitpra Sep 10, 2025
229f4d0
dedupe kafka message
nischitpra Sep 10, 2025
1be7b1f
log kafka push error
nischitpra Sep 10, 2025
41d78c2
no more file log
nischitpra Sep 10, 2025
7e1f0ac
sync downloads
nischitpra Sep 10, 2025
1c7900c
lookahead download
nischitpra Sep 10, 2025
700befa
channel based download
nischitpra Sep 10, 2025
27ced99
fetch latest block after s3 is completed
nischitpra Sep 10, 2025
0d0fa75
minor change
nischitpra Sep 10, 2025
7466bc9
minor change
nischitpra Sep 10, 2025
b8be8e4
committer rpc parallel calls env
nischitpra Sep 10, 2025
6aa9911
Merge branch 'main' into np/committer_redo
nischitpra Sep 11, 2025
aea21e6
refactor committer to libs
nischitpra Sep 14, 2025
8e17144
more refactoring
nischitpra Sep 14, 2025
2154b7f
git start and end boundry for backfill
nischitpra Sep 14, 2025
4aee9a6
basic backfill structure
nischitpra Sep 14, 2025
af9a19f
minor change
nischitpra Sep 14, 2025
acd879f
backfill complete
nischitpra Sep 14, 2025
7eb69bb
committer refactoring
nischitpra Sep 14, 2025
e040eb8
minor change
nischitpra Sep 14, 2025
b6939e2
minor change
nischitpra Sep 14, 2025
2088770
checksum parquet file
nischitpra Sep 14, 2025
301747b
debug logs
nischitpra Sep 15, 2025
d7a2822
debug logs + bigint to uint64 conversion
nischitpra Sep 15, 2025
f475a26
disable some logs
nischitpra Sep 15, 2025
780297d
upload file working
nischitpra Sep 15, 2025
8ed7864
minor change
nischitpra Sep 15, 2025
bdbae12
minor change
nischitpra Sep 15, 2025
3b81cc5
dynamic batch size for getting rpc data
nischitpra Sep 15, 2025
7234206
minor fixes to batch size
nischitpra Sep 15, 2025
c55c009
clickhouse query fixes
nischitpra Sep 15, 2025
17bd9cf
minor change
nischitpra Sep 15, 2025
71db36a
minor logging
nischitpra Sep 15, 2025
3848762
minor logging
nischitpra Sep 15, 2025
e5eb7f0
minor change
nischitpra Sep 15, 2025
c3daa13
remove extra logs
nischitpra Sep 15, 2025
b8c35e2
batch rpc calls
nischitpra Sep 15, 2025
afc0de7
parallel rpc calls in batch backfill
nischitpra Sep 15, 2025
a77f9ad
minor change
nischitpra Sep 15, 2025
7fd836a
start block range fix
nischitpra Sep 15, 2025
4b1c286
committer all files uploaded fix
nischitpra Sep 15, 2025
ed71059
update to default envs
nischitpra Sep 16, 2025
e58b588
limit parallel calls in batch rpc
nischitpra Sep 16, 2025
31ba421
committer streaming block data
nischitpra Sep 17, 2025
7d5ad97
minor change
nischitpra Sep 17, 2025
2bf7973
minor fix
nischitpra Sep 17, 2025
a6a7a71
minor change
nischitpra Sep 17, 2025
5ded7dc
minor change
nischitpra Sep 17, 2025
7020377
minor change
nischitpra Sep 17, 2025
5f7e37b
latestblock fix
nischitpra Sep 17, 2025
f49f444
remove redundant blockDataChannel limit
nischitpra Sep 18, 2025
04f60da
backfill upload parquet to s3 if crashing
nischitpra Sep 22, 2025
123d6e3
memory released bytes log
nischitpra Sep 22, 2025
19c9ce8
update rpc retry logic to only failed ones
nischitpra Sep 22, 2025
f9b3612
committer acquire lock after sending blockdata to channel
nischitpra Sep 22, 2025
d78c0da
memory lock update
nischitpra Sep 22, 2025
d21ac95
backfill metrics
nischitpra Sep 23, 2025
2bf90e0
metrics server for backfill
nischitpra Sep 23, 2025
fc2ca72
committer metrics
nischitpra Sep 23, 2025
1dfc50a
committer metrics server
nischitpra Sep 23, 2025
b65bcb5
metrics fixes
nischitpra Sep 23, 2025
1698b1f
auto disable indexer + deploy committer
nischitpra Sep 24, 2025
dfb8bef
296 fix blocks too big (#292)
nischitpra Sep 26, 2025
b10c98a
minor change
nischitpra Sep 28, 2025
714b211
minor change
nischitpra Sep 28, 2025
86334b0
compress messages
nischitpra Oct 9, 2025
00df078
log validation fix
nischitpra Oct 14, 2025
a306475
conditional compression threshold
nischitpra Oct 15, 2025
faf59c3
remove clickhouse v1 (#293)
nischitpra Oct 16, 2025
15bdf2d
reorg (#294)
nischitpra Oct 17, 2025
a4fd32f
log rpc error
nischitpra Oct 17, 2025
a3d958a
minor change (#295)
nischitpra Oct 27, 2025
d9b01e7
remove unused code (#296)
nischitpra Oct 27, 2025
81f7606
resolve merge conflict
nischitpra Oct 27, 2025
70ee07d
changes from comments
nischitpra Oct 27, 2025
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 .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,4 @@ configs/secrets*

indexer
main
*.parquet
139 changes: 0 additions & 139 deletions cmd/api.go

This file was deleted.

34 changes: 34 additions & 0 deletions cmd/backfill.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
package cmd

import (
"fmt"
"net/http"

"github.com/prometheus/client_golang/prometheus/promhttp"
"github.com/rs/zerolog/log"
"github.com/spf13/cobra"
"github.com/thirdweb-dev/indexer/internal/backfill"
)

var backfillCmd = &cobra.Command{
Use: "backfill",
Short: "run backfill",
Long: "backfill data from old clickhouse + rpc to s3. if cannot get all blocks for a range, it will panic",
Run: RunBackfill,
}

func RunBackfill(cmd *cobra.Command, args []string) {
fmt.Println("running backfill")

// Start Prometheus metrics server
log.Info().Msg("Starting Metrics Server on port 2112")
go func() {
http.Handle("/metrics", promhttp.Handler())
if err := http.ListenAndServe(":2112", nil); err != nil {
log.Error().Err(err).Msg("Metrics server error")
}
}()

backfill.Init()
backfill.RunBackfill()
}
37 changes: 37 additions & 0 deletions cmd/committer.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
package cmd

import (
"fmt"
"net/http"

"github.com/prometheus/client_golang/prometheus/promhttp"
"github.com/rs/zerolog/log"
"github.com/spf13/cobra"
"github.com/thirdweb-dev/indexer/internal/committer"
)

var committerCmd = &cobra.Command{
Use: "committer",
Short: "run committer",
Long: "published data from s3 to kafka. if block is not found in s3, it will panic",
Run: RunCommitter,
}

func RunCommitter(cmd *cobra.Command, args []string) {
fmt.Println("running committer")

// Start Prometheus metrics server
log.Info().Msg("Starting Metrics Server on port 2112")
go func() {
http.Handle("/metrics", promhttp.Handler())
if err := http.ListenAndServe(":2112", nil); err != nil {
log.Error().Err(err).Msg("Metrics server error")
}
}()

committer.Init()
committer.InitReorg()

go committer.RunReorgValidator()
committer.CommitStreaming()
}
Loading
Loading