Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
170 commits
Select commit Hold shift + click to select a range
7985e50
chore+fix: rpc logging trace initial implementation, error handling i…
xadahiya Jan 27, 2023
6b85134
chore: replace requests usage with httpx, add write to files option i…
xadahiya Jan 30, 2023
1f8a449
chore+fix: update retry multiplier to 2, remove extra parameters from…
xadahiya Jan 30, 2023
23dbb15
chore: remove hardcoding of pairs.json file, improve project config f…
xadahiya Feb 1, 2023
a4fdb21
chore: cleanup registration flow
xadahiya Feb 1, 2023
affa72c
chore: Moved out ProcessorDistribuitor
xadahiya Feb 1, 2023
abe16ad
chore: cleanup Epoch Distribution messages (removed appending all con…
xadahiya Feb 1, 2023
f7b4dc3
chore: cleanup queues, remove hardcoding and subtopics
xadahiya Feb 1, 2023
4fd07fb
chore: cleanup pooler.callback_modules.helpers.AuditProtocolCommandsH…
xadahiya Feb 1, 2023
5448467
chore: move out models from callback folder
xadahiya Feb 1, 2023
8512588
chore: refactor and improve project config, worker config, other mino…
xadahiya Feb 2, 2023
c357e88
chore: refactor settings, remove contracts and worker related stuff
xadahiya Feb 2, 2023
aad3aae
chore: udpate snapshotter_autofill to generate worker settings
xadahiya Feb 2, 2023
3d21585
chore: move reserves and volume processing to separate workers, add b…
xadahiya Feb 2, 2023
dcca056
simplify project config
xadahiya Feb 2, 2023
0ef2426
chore: fix python style and formatting issues
xadahiya Feb 4, 2023
6f8caca
chore: Exception handling improvements, callback tests update, other …
xadahiya Feb 6, 2023
aded48b
chore: update and better organization of tests
xadahiya Feb 6, 2023
5f55988
chore: update trade_volume_calculations_test imports, add TODO comment
xadahiya Feb 6, 2023
b5a1b7d
chore: remove ConstructRPC interface
xadahiya Feb 6, 2023
c447640
chore: refactor _send_to_audit_protocol > Callback Worker class, mino…
xadahiya Feb 6, 2023
3363faa
fix: add missing import in pair_total_reserves
xadahiya Feb 6, 2023
4ee2a71
chore: refactor and improve redis keys, update projects.example.json …
xadahiya Feb 7, 2023
ebc44de
chore: cleanup and simplify worker creation
xadahiya Feb 7, 2023
94b1909
feat: Unified RPC interface, initial setup and implementation
xadahiya Feb 8, 2023
4d3f1a7
chore+fix: bugfixes and improvement, and better organisation
xadahiya Feb 8, 2023
7045146
chore: cleanup callback_modules and pooler.utils.helper_functions
xadahiya Feb 8, 2023
695d077
fix: minor bug fix in Exception Logging
xadahiya Feb 8, 2023
df9a668
chore: move out warm_up_cache_for_snapshot_constructors and related f…
xadahiya Feb 10, 2023
0dd6cb5
chore: remove format_exception, switch to loguru exception tracing
xadahiya Feb 10, 2023
8c519ea
chore: cleaup and performance improvements
xadahiya Feb 10, 2023
9b31c2f
chore: final decoupling done, made paths inside modules relative. Com…
xadahiya Feb 10, 2023
4780523
chore: remove Postman collection, will use a dynamic one if needed in…
xadahiya Feb 10, 2023
167021b
chore: fix AsyncClient and other initializations
xadahiya Feb 10, 2023
973b7db
chore: minor bug fix rpc.get_events_logs
xadahiya Feb 10, 2023
a27173f
fix: typo fix in core`
xadahiya Feb 10, 2023
545a352
fix: proper RpcHelper initialization and usage
xadahiya Feb 13, 2023
37c5a3e
feat+chore: custom web3 call interface, remove gnosis-py, update libr…
xadahiya Feb 13, 2023
2e8c396
feat: add custom aiohttp session for async web3 providers
xadahiya Feb 13, 2023
09436a6
feat: Initial Caching layer implementation for RPC calls, cleanup usa…
xadahiya Feb 15, 2023
5a99a4c
chore+fix: improved caching in pricing functions, fix duplication of …
xadahiya Feb 15, 2023
e320bca
chore: add exception handling for partial failure in jsonrpc calls
xadahiya Feb 15, 2023
da7e54b
cleanup rabbitmq queues and epoch_broadcast_callback_manager
xadahiya Feb 17, 2023
2587db8
feat+chore: generic workers implemented, calculating rpc stats in red…
xadahiya Feb 17, 2023
3c95a22
fix: fix web3_calls caching and some other minor bug fixes
xadahiya Feb 20, 2023
cc5eacc
chore: cleanup data, and message models. Other minor fixes
xadahiya Feb 20, 2023
6407431
chore: cleanup static files
xadahiya Feb 20, 2023
b9b61bb
Merge pull request #175 from PowerLoom/decouple_additional_improvements
xadahiya Feb 23, 2023
66a2225
Merge pull request #178 from PowerLoom/chore/readme_update
xadahiya Feb 23, 2023
40f8d23
chore: update README.md for decoupled pooler
xadahiya Feb 23, 2023
64097e3
chore: cleanup and shorten text
anomit Feb 23, 2023
13a20e0
chore: add command to login to pooler docker container
xadahiya Feb 23, 2023
ef67040
Merge pull request #179 from PowerLoom/chore/decoupled_documentation
xadahiya Feb 24, 2023
1315a76
chore: fix typo and add RPC usage related warning
xadahiya Feb 27, 2023
b78f7b7
chore: cleanup pricing.get_token_price_in_block_range for better rpc …
xadahiya Feb 28, 2023
8120516
feat: Event Detector initial implementation
xadahiya Mar 13, 2023
896bba0
chore: update epoch detector to use the new queue (can just be disabl…
xadahiya Mar 13, 2023
e73358a
chore: separate out generic worker from callback_worker
xadahiya Mar 13, 2023
86c4eed
chore: add indexing and aggregation workers, update processhubcore, u…
xadahiya Mar 14, 2023
00af2f1
chore: add ipfs related libraries and settings
xadahiya Mar 15, 2023
e8d4779
chore: add indexer initial config and templates
xadahiya Mar 15, 2023
33be2e2
chore: onchain indexer initial integration done
xadahiya Mar 15, 2023
6df27cd
chore+fix: starting event detector on stast, import fixes and other m…
xadahiya Mar 23, 2023
257f1c7
chore: cleanup
xadahiya Mar 23, 2023
15ff696
chore: indexer worker issues fixed, tested and working
xadahiya Mar 23, 2023
03bed41
fix: worker consumer task_name in indexing_worker._process_task
xadahiya Mar 23, 2023
32231bc
fix: make EpochDetectorProcess more robust
xadahiya Mar 31, 2023
444b54d
Merge remote-tracking branch 'origin/onchain_pooler' into epoch_detec…
xadahiya Apr 5, 2023
5d968cb
Merge pull request #183 from PowerLoom/epoch_detector_improvements
xadahiya Apr 5, 2023
9eb9a50
chore: cleanup exception handling in snapshot calculation
xadahiya Apr 5, 2023
6c575f9
chore: add notifications for snapshot generation failure
xadahiya Apr 6, 2023
9db708b
Merge pull request #184 from PowerLoom/chore/better_exception_handling
xadahiya Apr 10, 2023
9dc172c
feat: cleaner IPFS fetch utils. tests for indexer
anomit Apr 14, 2023
32ca16f
feat: aggregator initial config design, processor_distributor udpate,…
xadahiya Apr 18, 2023
bf9d662
chore: cleanup snapshot worker, add message models for CommitPayloadQ…
xadahiya Apr 19, 2023
6ca0767
feat: aggregate worker implemented, add aggregegate processor placeho…
xadahiya Apr 19, 2023
b2a47ce
fix: minor bug fixes, all workers starting now
xadahiya Apr 19, 2023
b25d155
chore: bugfixes, aggregator system working
xadahiya Apr 19, 2023
0049dd5
feat+chore: update submission message models, submitting everything t…
xadahiya Apr 20, 2023
4bf5ab2
chore: cleanup
xadahiya Apr 20, 2023
55f3d7e
feat: aggregation over aggregation waiting framework initial version …
xadahiya Apr 20, 2023
ed55e9a
chore: improve init process for workers
xadahiya Apr 20, 2023
c851725
fix: fix rabbitmq submission for commit payload queue
xadahiya Apr 21, 2023
002ee37
chore+fix: separate queues for each type of worker, other cleanup and…
xadahiya Apr 21, 2023
5d91a33
fix: double encoding of Payload Commit messages
xadahiya Apr 23, 2023
052ee7f
chore: switch to EpochId based models, minor cleanup
xadahiya Apr 25, 2023
3869fbc
chore: Snapshotter cleanup and updates according to the new architecture
xadahiya Apr 30, 2023
e4b228a
chore: processor_distributor cleanup and fixes
xadahiya Apr 30, 2023
53ed072
fix: minor bug fixes, new architecture working as expected now post c…
xadahiya Apr 30, 2023
38952af
chore: aggregation settings and modules setup for uniswap v2 usecase
xadahiya Apr 30, 2023
76642af
feat+chore: aggregation helpers initial implementation, aggregation w…
xadahiya May 1, 2023
d8c31cb
chore: Protocol state contract ABI update, minor cleanup
xadahiya May 1, 2023
196ee60
chore: update Protocol state contract to new clean contract
xadahiya May 1, 2023
c63ca38
chore+feat: implement bulk and source chain info related functions, m…
xadahiya May 1, 2023
13efd0b
chore: improve single_trade_volume aggregate worker
xadahiya May 1, 2023
7a07251
chore: trade volume aggregate calculation initial implementation done…
xadahiya May 2, 2023
553817e
chore: improve logging and batching improvements
xadahiya May 3, 2023
031a2e9
chore: bug fixes and better logging
xadahiya May 3, 2023
6587757
chore: rewrite bulk snapshot fetch function for better performance
xadahiya May 3, 2023
3a8ce02
chore: cleanup and switch to latest ipfs client
xadahiya May 3, 2023
fa1bcf6
fix: bug fix in fetching single snapshots
xadahiya May 3, 2023
91011bf
feat+chore: token aggregator initial implementation done, update aggr…
xadahiya May 4, 2023
611aa35
fix: minor typo fix in top tokens
xadahiya May 4, 2023
1b4446c
feat: top pair aggregation initial implementation
xadahiya May 5, 2023
ce935f5
feat: uniswap aggregate stats snapshot initial implementation done
xadahiya May 5, 2023
239f9b5
chore: code improvements and minor logical fixes in aggregate calcula…
xadahiya May 5, 2023
4124897
chore: bettter IPFS exception handling and retries
anomit May 5, 2023
77d5428
chore: add TODOs for protocol state warmup in cache
anomit May 5, 2023
2a30ed9
fix: minor typo fix in reserves snapshot generation
xadahiya May 5, 2023
d6301d6
chore+fix: using smaller aggregator config for testing, minor bug fix…
xadahiya May 5, 2023
ec5da6a
fix: bug fixes in aggregate and reserver calculations
xadahiya May 5, 2023
772e87e
fix+chore: bug fixes in aggregation calculations, add todo for updati…
xadahiya May 5, 2023
0028ecf
feat+chore: New generic core API implementation and legacy API cleanu…
xadahiya May 8, 2023
3d6b157
fix: returning snapshot data in json now
xadahiya May 8, 2023
7e85dd9
chore: Switch to sha3_256 based hash for aggregate project id calcula…
xadahiya May 8, 2023
13c9ed2
feat: protocol state loader initial commit
anomit May 9, 2023
533f3a4
fix: indentation fix in aggregation worker
xadahiya May 9, 2023
e65a46d
chore: clean up and update settings example and data model, remove un…
anomit May 9, 2023
052f2a3
chore: update poetry
anomit May 9, 2023
aa83267
fix: cache epoch size while initializing proc distributor
anomit May 9, 2023
cef31a6
fix: data model field name for 24h change in fees
anomit May 9, 2023
af33744
chore: Add current_epoch and epoch_info endpoints
xadahiya May 9, 2023
38407ab
chore: made event detector more resilient
xadahiya May 9, 2023
c534009
feat: export and load state of finalized CIDs
anomit May 11, 2023
6aece6a
fix: RPC helper global cursor on node list changed to local context
anomit May 11, 2023
48ac7a7
chore: clean up task failure notiication handling
anomit May 11, 2023
e3c90d1
chore: settings cleanup, remove outdated test files
xadahiya May 15, 2023
2e665cd
chore: move settings and config to outer directory
xadahiya May 15, 2023
5859313
chore: move out async_ipfshttpclient library -> PowerLoom/py-ipfs-cli…
xadahiya May 15, 2023
70bc884
chore: issue reporting and consensus urls cleanup, simplified notific…
xadahiya May 16, 2023
4d0887f
chore: Improve project name generation (using : based separator now),…
xadahiya May 16, 2023
7250248
chore: switch from ssh to https for ipfs_client, fix poetry lock file
xadahiya May 17, 2023
dd01fc4
fix: bugs in rpc.py and failure alerts wrapper
xadahiya May 17, 2023
9c3e56c
fix: bugfixes in alerting mechanism
xadahiya May 17, 2023
ec7ecb1
enhancement: verify CIDs finalized in null in local cache against fin…
anomit May 17, 2023
b7b7008
chore: Update SnapshotterIssue data model according to slack webhook …
xadahiya May 17, 2023
0b21352
Merge remote-tracking branch 'refs/remotes/origin/feat/architecture_w…
xadahiya May 17, 2023
ca2cda7
fix: anchor_rpc_helper setup in callback workers, refactor processor_…
xadahiya May 17, 2023
a020b47
feat: Add endpoint to fetch finalized project cid in Core API
xadahiya May 17, 2023
cb6983f
fix: bug fix in aggregation failure alert handler
xadahiya May 17, 2023
ff25706
fix: update project contract separator for aggregation projects
xadahiya May 17, 2023
702504d
chore: switch from redis cache to local filesystem cache for snapshot…
xadahiya May 18, 2023
336b38a
feat: 7 day trade volume aggregation
anomit May 18, 2023
e21ce90
enhancement: dependency of 7day aggregation on single pair contract o…
anomit May 18, 2023
1b9d814
chore: cleaner aggregation conditions when 7days worth of snapshots h…
anomit May 18, 2023
f503063
fix: bug fixes in helper functions and aggregate volume calculations
xadahiya May 19, 2023
fae5dc2
fix: protocol state exporter verifies null finalized CIDs against con…
anomit May 19, 2023
356f579
fix: return stringified null finalized CID against an epoch from helper
anomit May 19, 2023
6b9a7ef
chore: Improve get snapshot data helper function
xadahiya May 19, 2023
cb165b6
Merge remote-tracking branch 'refs/remotes/origin/feat/architecture_w…
xadahiya May 19, 2023
25db1d0
fix: data models and calculations around aggregates
anomit May 22, 2023
1c6d3fb
fix: data model usage
anomit May 22, 2023
bd6db5e
chore: correct usage of log and data utils
anomit May 22, 2023
3869d1e
fix: ensure appropriate pydantic data model usage for aggregate states
anomit May 22, 2023
3e35b89
fix+chore: tidy up data and file utils helpers interfaces and usages
anomit May 22, 2023
ef31e8e
fix: core_api get_data_for_project_id_epoch_id return type json error
xadahiya May 23, 2023
d1cc31a
fix: get_finalized_cid_for_project_id_epoch_id endpoint await bug
xadahiya May 23, 2023
08e264a
chore: improve single 24h volume calculations
xadahiya May 23, 2023
0e331ef
fix: wrong epochID bug while calculating 24h trade volume from previo…
xadahiya May 25, 2023
ec9bec7
fix: division by zero error in top_tokens
xadahiya May 25, 2023
b2430ad
chore: move web3storage backup param to config, remove extra payload …
xadahiya May 26, 2023
46b85c2
chore: Update IPFS settings model and settings.example.json
xadahiya May 27, 2023
dce2dc0
fix: ExternalAPIAuth model ordering
xadahiya May 27, 2023
90d46db
chore: update ifps_client build
xadahiya May 27, 2023
ed51956
chore: Update example files and autofill scripts
xadahiya May 29, 2023
752c608
cleanup: remove .env source
xadahiya May 29, 2023
a6b94f2
chore: minor typo fix in settings.example.json
xadahiya May 29, 2023
6bc2398
fix: make retry_state_callback sync
xadahiya May 29, 2023
844c541
chore: increase IPFS timeout
xadahiya May 29, 2023
4e40305
Merge remote-tracking branch 'origin/dockerify' into chore/build_sh_prep
xadahiya May 29, 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
9 changes: 4 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
.env
.python-version
settings.json
__pycache__/
logs/
.idea/
.DS_Store
screenlog*
temp/*
uniswapTokenData
test.py
pooler/static/cached_pair_addresses.json
pooler/auth/settings/auth_settings.json
**/*projects.json
**/*aggregator.json
**/*settings.json
**/*.backup
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ RUN chmod +x ./snapshotter_autofill.sh ./init_processes.sh

# Expose the port that the application will listen on
EXPOSE 8002
EXPOSE 8555
# EXPOSE 9090

# Start the application using PM2
# CMD pm2 start pm2.config.js && pm2 logs --lines 100
497 changes: 209 additions & 288 deletions README.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build-docker.sh
Original file line number Diff line number Diff line change
@@ -1 +1 @@
docker build -t powerloom-pooler .
docker build -t powerloom-pooler .
114 changes: 114 additions & 0 deletions config/aggregator.example.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
{
"config": [{
"project_type": "aggregate_uniswap_pairContract_24h_trade_volume",
"aggregate_on": "SingleProject",
"filters": {
"projectId": "uniswap_pairContract_trade_volume"
},
"processor": {
"module": "pooler.modules.uniswapv2.aggregate.single_uniswap_trade_volume_24h",
"class_name": "AggreagateTradeVolumeProcessor"
}
},
{
"project_type": "aggregate_uniswap_pairContract_7d_trade_volume",
"aggregate_on": "SingleProject",
"filters": {
"projectId": "aggregate_uniswap_pairContract_24h_trade_volume"
},
"processor": {
"module": "pooler.modules.uniswapv2.aggregate.single_uniswap_trade_volume_7d",
"class_name": "AggreagateTradeVolumeProcessor"
}
},
{
"project_type": "aggregate_uniswap_24h_top_pairs_lite",
"aggregate_on": "MultiProject",
"projects_to_wait_for": [
"aggregate_uniswap_pairContract_24h_trade_volume:0xb4e16d0168e52d35cacd2c6185b44281ec28c9dc:UNISWAPV2-ph15-prod",
"uniswap_pairContract_pair_total_reserves:0xb4e16d0168e52d35cacd2c6185b44281ec28c9dc:UNISWAPV2-ph15-prod",
"aggregate_uniswap_pairContract_24h_trade_volume:0xae461ca67b15dc8dc81ce7615e0320da1a9ab8d5:UNISWAPV2-ph15-prod",
"uniswap_pairContract_pair_total_reserves:0xae461ca67b15dc8dc81ce7615e0320da1a9ab8d5:UNISWAPV2-ph15-prod",
"aggregate_uniswap_pairContract_24h_trade_volume:0x0d4a11d5eeaac28ec3f61d100daf4d40471f1852:UNISWAPV2-ph15-prod",
"uniswap_pairContract_pair_total_reserves:0x0d4a11d5eeaac28ec3f61d100daf4d40471f1852:UNISWAPV2-ph15-prod",
"aggregate_uniswap_pairContract_24h_trade_volume:0x3041cbd36888becc7bbcbc0045e3b1f144466f5f:UNISWAPV2-ph15-prod",
"uniswap_pairContract_pair_total_reserves:0x3041cbd36888becc7bbcbc0045e3b1f144466f5f:UNISWAPV2-ph15-prod",
"aggregate_uniswap_pairContract_24h_trade_volume:0xd3d2e2692501a5c9ca623199d38826e513033a17:UNISWAPV2-ph15-prod",
"uniswap_pairContract_pair_total_reserves:0xd3d2e2692501a5c9ca623199d38826e513033a17:UNISWAPV2-ph15-prod",
"aggregate_uniswap_pairContract_24h_trade_volume:0xbb2b8038a1640196fbe3e38816f3e67cba72d940:UNISWAPV2-ph15-prod",
"uniswap_pairContract_pair_total_reserves:0xbb2b8038a1640196fbe3e38816f3e67cba72d940:UNISWAPV2-ph15-prod",
"aggregate_uniswap_pairContract_24h_trade_volume:0xa478c2975ab1ea89e8196811f51a7b7ade33eb11:UNISWAPV2-ph15-prod",
"uniswap_pairContract_pair_total_reserves:0xa478c2975ab1ea89e8196811f51a7b7ade33eb11:UNISWAPV2-ph15-prod"
],
"processor": {
"module": "pooler.modules.uniswapv2.aggregate.multi_uniswap_top_pairs_24h",
"class_name": "AggreagateTopPairsProcessor"
}
},
{
"project_type": "aggregate_uniswap_24h_top_tokens_lite",
"aggregate_on": "MultiProject",
"projects_to_wait_for": [
"aggregate_uniswap_pairContract_24h_trade_volume:0xb4e16d0168e52d35cacd2c6185b44281ec28c9dc:UNISWAPV2-ph15-prod",
"uniswap_pairContract_pair_total_reserves:0xb4e16d0168e52d35cacd2c6185b44281ec28c9dc:UNISWAPV2-ph15-prod",
"aggregate_uniswap_pairContract_24h_trade_volume:0xae461ca67b15dc8dc81ce7615e0320da1a9ab8d5:UNISWAPV2-ph15-prod",
"uniswap_pairContract_pair_total_reserves:0xae461ca67b15dc8dc81ce7615e0320da1a9ab8d5:UNISWAPV2-ph15-prod",
"aggregate_uniswap_pairContract_24h_trade_volume:0x0d4a11d5eeaac28ec3f61d100daf4d40471f1852:UNISWAPV2-ph15-prod",
"uniswap_pairContract_pair_total_reserves:0x0d4a11d5eeaac28ec3f61d100daf4d40471f1852:UNISWAPV2-ph15-prod",
"aggregate_uniswap_pairContract_24h_trade_volume:0x3041cbd36888becc7bbcbc0045e3b1f144466f5f:UNISWAPV2-ph15-prod",
"uniswap_pairContract_pair_total_reserves:0x3041cbd36888becc7bbcbc0045e3b1f144466f5f:UNISWAPV2-ph15-prod",
"aggregate_uniswap_pairContract_24h_trade_volume:0xd3d2e2692501a5c9ca623199d38826e513033a17:UNISWAPV2-ph15-prod",
"uniswap_pairContract_pair_total_reserves:0xd3d2e2692501a5c9ca623199d38826e513033a17:UNISWAPV2-ph15-prod",
"aggregate_uniswap_pairContract_24h_trade_volume:0xbb2b8038a1640196fbe3e38816f3e67cba72d940:UNISWAPV2-ph15-prod",
"uniswap_pairContract_pair_total_reserves:0xbb2b8038a1640196fbe3e38816f3e67cba72d940:UNISWAPV2-ph15-prod",
"aggregate_uniswap_pairContract_24h_trade_volume:0xa478c2975ab1ea89e8196811f51a7b7ade33eb11:UNISWAPV2-ph15-prod",
"uniswap_pairContract_pair_total_reserves:0xa478c2975ab1ea89e8196811f51a7b7ade33eb11:UNISWAPV2-ph15-prod"
],
"processor": {
"module": "pooler.modules.uniswapv2.aggregate.multi_uniswap_top_tokens",
"class_name": "AggreagateTopTokensProcessor"
}
},
{
"project_type": "aggregate_uniswap_7d_top_pairs_lite",
"aggregate_on": "MultiProject",
"projects_to_wait_for": [
"aggregate_uniswap_pairContract_7d_trade_volume:0xb4e16d0168e52d35cacd2c6185b44281ec28c9dc:UNISWAPV2-ph15-prod",
"aggregate_uniswap_pairContract_7d_trade_volume:0xae461ca67b15dc8dc81ce7615e0320da1a9ab8d5:UNISWAPV2-ph15-prod",
"aggregate_uniswap_pairContract_7d_trade_volume:0x0d4a11d5eeaac28ec3f61d100daf4d40471f1852:UNISWAPV2-ph15-prod",
"aggregate_uniswap_pairContract_7d_trade_volume:0x3041cbd36888becc7bbcbc0045e3b1f144466f5f:UNISWAPV2-ph15-prod",
"aggregate_uniswap_pairContract_7d_trade_volume:0xd3d2e2692501a5c9ca623199d38826e513033a17:UNISWAPV2-ph15-prod",
"aggregate_uniswap_pairContract_7d_trade_volume:0xbb2b8038a1640196fbe3e38816f3e67cba72d940:UNISWAPV2-ph15-prod",
"aggregate_uniswap_pairContract_7d_trade_volume:0xa478c2975ab1ea89e8196811f51a7b7ade33eb11:UNISWAPV2-ph15-prod"
],
"processor": {
"module": "pooler.modules.uniswapv2.aggregate.multi_uniswap_top_pairs_7d",
"class_name": "AggreagateTopPairsProcessor"
}
},
{
"project_type": "aggregate_uniswap_24h_stats_lite",
"aggregate_on": "MultiProject",
"projects_to_wait_for": [
"aggregate_uniswap_pairContract_24h_trade_volume:0xb4e16d0168e52d35cacd2c6185b44281ec28c9dc:UNISWAPV2-ph15-prod",
"uniswap_pairContract_pair_total_reserves:0xb4e16d0168e52d35cacd2c6185b44281ec28c9dc:UNISWAPV2-ph15-prod",
"aggregate_uniswap_pairContract_24h_trade_volume:0xae461ca67b15dc8dc81ce7615e0320da1a9ab8d5:UNISWAPV2-ph15-prod",
"uniswap_pairContract_pair_total_reserves:0xae461ca67b15dc8dc81ce7615e0320da1a9ab8d5:UNISWAPV2-ph15-prod",
"aggregate_uniswap_pairContract_24h_trade_volume:0x0d4a11d5eeaac28ec3f61d100daf4d40471f1852:UNISWAPV2-ph15-prod",
"uniswap_pairContract_pair_total_reserves:0x0d4a11d5eeaac28ec3f61d100daf4d40471f1852:UNISWAPV2-ph15-prod",
"aggregate_uniswap_pairContract_24h_trade_volume:0x3041cbd36888becc7bbcbc0045e3b1f144466f5f:UNISWAPV2-ph15-prod",
"uniswap_pairContract_pair_total_reserves:0x3041cbd36888becc7bbcbc0045e3b1f144466f5f:UNISWAPV2-ph15-prod",
"aggregate_uniswap_pairContract_24h_trade_volume:0xd3d2e2692501a5c9ca623199d38826e513033a17:UNISWAPV2-ph15-prod",
"uniswap_pairContract_pair_total_reserves:0xd3d2e2692501a5c9ca623199d38826e513033a17:UNISWAPV2-ph15-prod",
"aggregate_uniswap_pairContract_24h_trade_volume:0xbb2b8038a1640196fbe3e38816f3e67cba72d940:UNISWAPV2-ph15-prod",
"uniswap_pairContract_pair_total_reserves:0xbb2b8038a1640196fbe3e38816f3e67cba72d940:UNISWAPV2-ph15-prod",
"aggregate_uniswap_pairContract_24h_trade_volume:0xa478c2975ab1ea89e8196811f51a7b7ade33eb11:UNISWAPV2-ph15-prod",
"uniswap_pairContract_pair_total_reserves:0xa478c2975ab1ea89e8196811f51a7b7ade33eb11:UNISWAPV2-ph15-prod"
],
"processor": {
"module": "pooler.modules.uniswapv2.aggregate.multi_uniswap_stats",
"class_name": "AggreagateStatsProcessor"
}
}
]
}
35 changes: 35 additions & 0 deletions config/projects.example.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"config": [{
"project_type": "uniswap_pairContract_pair_total_reserves",
"projects":[
"0xb4e16d0168e52d35cacd2c6185b44281ec28c9dc",
"0xae461ca67b15dc8dc81ce7615e0320da1a9ab8d5",
"0x0d4a11d5eeaac28ec3f61d100daf4d40471f1852",
"0x3041cbd36888becc7bbcbc0045e3b1f144466f5f",
"0xd3d2e2692501a5c9ca623199d38826e513033a17",
"0xbb2b8038a1640196fbe3e38816f3e67cba72d940",
"0xa478c2975ab1ea89e8196811f51a7b7ade33eb11"
],
"processor":{
"module": "pooler.modules.uniswapv2.pair_total_reserves",
"class_name": "PairTotalReservesProcessor"
}
},
{
"project_type": "uniswap_pairContract_trade_volume",
"projects":[
"0xb4e16d0168e52d35cacd2c6185b44281ec28c9dc",
"0xae461ca67b15dc8dc81ce7615e0320da1a9ab8d5",
"0x0d4a11d5eeaac28ec3f61d100daf4d40471f1852",
"0x3041cbd36888becc7bbcbc0045e3b1f144466f5f",
"0xd3d2e2692501a5c9ca623199d38826e513033a17",
"0xbb2b8038a1640196fbe3e38816f3e67cba72d940",
"0xa478c2975ab1ea89e8196811f51a7b7ade33eb11"
],
"processor":{
"module": "pooler.modules.uniswapv2.trade_volume",
"class_name": "TradeVolumeProcessor"
}
}
]
}
126 changes: 126 additions & 0 deletions config/settings.example.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
{
"namespace": "relevant-namespace",
"core_api": {
"host": "0.0.0.0",
"port": 8002,
"auth": {
"enabled": false,
"header_key": "X-API-KEY"
},
"public_rate_limit": "10000/day;200/minute;5/second"
},
"instance_id": "account-address",
"rpc": {
"full_nodes": [{
"url": "https://rpc-url",
"rate_limit": "10000000/day;2000/minute;100/second"
}],
"archive_nodes": [],
"force_archive_blocks": 100,
"retry": 5,
"request_time_out": 5,
"skip_epoch_threshold_blocks": 30,
"polling_interval": 15,
"connection_limits":{
"max_connections": 100,
"max_keepalive_connections": 50,
"keepalive_expiry": 300
}
},
"rlimit": {
"file_descriptors": 2048
},
"rabbitmq": {
"user": "guest",
"password": "guest",
"host": "rabbitmq",
"port": 5672,
"setup": {
"core": {
"exchange": "powerloom-backend"
},
"callbacks": {
"exchange": "powerloom-backend-callbacks"
},
"commit_payload": {
"exchange": "powerloom-backend-commit-payload"
},
"event_detector": {
"exchange": "powerloom-backend-event-detector"
}
}
},
"reporting": {
"slack_url": "https://slack-reporting-url",
"service_url": "https://powerloom-reporting-url"
},
"redis": {
"host": "redis",
"port": 6379,
"db": 0,
"password": null,
"ssl": false,
"cluster_mode": false
},
"redis_reader": {
"host": "redis",
"port": 6379,
"db": 0,
"password": null
},
"logs": {
"trace_enabled": false,
"write_to_files": true
},
"projects_config_path": "config/projects.json",
"aggregator_config_path": "config/aggregator.json",
"pair_contract_abi": "pooler/static/abis/UniswapV2Pair.json",
"protocol_state": {
"abi": "pooler/static/abis/ProtocolContract.json",
"address": "protocol-state-contract"
},
"callback_worker_config": {
"num_snapshot_workers": 8,
"num_aggregation_workers": 16
},
"ipfs": {
"url": "ipfs-writer-url",
"url_auth": {
"apiKey": "ipfs-writer-key",
"apiSecret": "ipfs-writer-secret"
},
"reader_url": "ipfs-reader-url",
"reader_url_auth": {
"apiKey": "ipfs-reader-key",
"apiSecret": "ipfs-reader-secret"
},
"write_rate_limit": {
"req_per_sec": 10,
"burst": 10
},
"timeout": 60,
"local_cache_path": "/home/ubuntu/local_cache/",
"connection_limits":{
"max_connections": 100,
"max_keepalive_connections": 50,
"keepalive_expiry": 300
}
},
"web3storage":{
"upload_snapshots": true,
"upload_aggregates": true
},
"anchor_chain_rpc": {
"full_nodes": [{
"url": "https://prost-rpc-url",
"rate_limit": "100000000/day;18000/minute;300/second"
}],
"retry": 5,
"request_time_out": 5,
"connection_limits":{
"max_connections": 100,
"max_keepalive_connections": 50,
"keepalive_expiry": 300
}
}
}
8 changes: 2 additions & 6 deletions init_processes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,14 @@
echo 'starting processes...';
pm2 start pm2.config.js

echo 'registering projects...';
poetry run python -m pooler.register_projects || exit 1


# Waiting for other processes to start
echo 'waiting for processes to start..';
sleep 10

poetry run python -m pooler.processhub_cmd start EpochCallbackManager
poetry run python -m pooler.processhub_cmd start ProcessorDistributor
sleep 3

poetry run python -m pooler.processhub_cmd start SystemEpochDetector
poetry run python -m pooler.processhub_cmd start SystemEventDetector

echo 'started all pooler scripts';

Expand Down
1 change: 1 addition & 0 deletions logs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.log
Loading