Commit Graph

19 Commits

Author SHA1 Message Date
Mohamed Sohail a326593b21
feat: add approve filter (tested on chain) (#52)
* wip: add approve filter (untested)

* main: register approve filter

* fix: update tofrom addresses in event payload
2023-07-10 12:20:50 +08:00
Mohamed Sohail a291512d95
feat: add timestamp and txType to event payload
* closes #39
2023-04-24 07:25:25 +00:00
Mohamed Sohail 4fcc088784
feat: add retryable head subscription wrapper
* closes #18
2023-04-14 08:27:08 +00:00
Mohamed Sohail 8085168ed3
major refactor: bootstrap from registry map and token index (see notes)
* the cache is now bootstrapped from the token index and registry map
* a token index filter auto updates the cache when a token is added (using add sig)
* minor fixes to filters
2023-03-29 16:17:30 +00:00
Mohamed Sohail 94f1f3bc2c
fix: add checksum address to event, use stdlib json, load addresses from ko 2023-03-11 09:29:51 +00:00
Mohamed Sohail c03932138d
fix: missing janitor count report 2023-03-09 08:33:09 +00:00
Mohamed Sohail 7b334e8691
fix: janitor incorrect missing block report 2023-03-08 14:52:29 +00:00
Mohamed Sohail 2bbc05bb45
major refactor: sig ch, remove conf settings, jetstream pub, ci
* This is a major refactor and includes general improvements around

- context cancellation
- build settings
- jetstream pub sub
- logging
- docker builds
- conf loading
2023-03-08 14:30:40 +00:00
Mohamed Sohail 9d1b77e907
refactor: filters, pipeline, minor fixes, remove RPC support (#27)
* devnet: snapshot

* refactor: pass struct through pipeline fllters

* refactor: replace timer with ticker

* refactor: filters, jetstream emitter

* add register filter
* update gas filter

* refactor: remove RPC fetcher support
2023-02-24 13:28:30 +03:00
Mohamed Sohail 2161e8936b
feat: jetstream event full tx object
* minor pass pointer down the pipleine
2023-01-19 13:36:21 +03:00
Mohamed Sohail 20fc30c34a
feat: RPC block fetcher (#15)
* feat: init base logic for rpc fetcher

* feat: rpc block fetcher, move filters to internal

* move filters to internal folder
* rpc block fetcher
* add benchmarks:

goos: linux
goarch: amd64
pkg: github.com/grassrootseconomics/cic-chain-events/pkg/fetch
cpu: AMD EPYC Processor
Benchmark_RPC
Benchmark_RPC/RPC_Block_Fetcher_Benchmark
Benchmark_RPC/RPC_Block_Fetcher_Benchmark-4                   25          46000646 ns/op          221697 B/op        844 allocs/op
Benchmark_GraphQL
Benchmark_GraphQL/GraphQL_Block_Fetcher_Benchmark
Benchmark_GraphQL/GraphQL_Block_Fetcher_Benchmark-4           56          21219962 ns/op           56686 B/op         94 allocs/op
PASS
ok      github.com/grassrootseconomics/cic-chain-events/pkg/fetch       2.920s

* inline-docs: Describe RPC fetcher
2023-01-19 11:42:59 +03:00
Mohamed Sohail ef9f2b2b7f
hotfix: drain janitor queue, worker pool, js
* fully drain worker queue before reading gap from db
* dedicated go routine for head syncer
* emit blok, tx index and hash to jetstream
2023-01-18 22:40:14 +03:00
Mohamed Sohail 02e31146cc
refactor: move filter and fetch to pkg 2023-01-14 10:18:50 +00:00
Mohamed Sohail f791b87172
update: add filters for transfer events and tests 2023-01-14 10:18:50 +00:00
Mohamed Sohail 42bc68024f
docs: add functionality, and usage
others:

* remove drop command from sql migration
2023-01-11 09:29:16 +00:00
Mohamed Sohail f1e74961b0
fix: deepsource suggestions 2023-01-11 08:43:05 +00:00
Mohamed Sohail df88d9df16
refactor: perf, update libraries ci, and add docs
* update config to better defaults
* add docs, inline and md
* add context support throughout
* replace json with goccy/go-json for better decoding of large JSON
* update graphql fetcher: replace ioutil with io
* test runner script (until CI is ready)
* update CI build config
2023-01-11 08:13:59 +00:00
Mohamed Sohail 0ccdaa0345
feat: add stats api, fix pipeline exe
* added cUSD sample filters
* decouple stats from metrics
2023-01-06 11:32:20 +00:00
Mohamed Sohail df4f188807
release: v0.1.0-alpha 2023-01-05 11:45:09 +00:00