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

feat: set default filter policy #117

Closed
anxolin opened this issue Nov 21, 2023 · 0 comments · Fixed by #120
Closed

feat: set default filter policy #117

anxolin opened this issue Nov 21, 2023 · 0 comments · Fixed by #120
Assignees
Labels
enhancement New feature or request

Comments

@anxolin
Copy link
Contributor

anxolin commented Nov 21, 2023

Problem

Allow to define DROP, ACCEPT or SKIP as the default filter policy

This way, we can define the indexing as a white list, or deny list

Context

#116 (comment)

@mfw78 mfw78 changed the title feat: set default filer policy feat: set default filter policy Nov 22, 2023
@mfw78 mfw78 added the enhancement New feature or request label Nov 22, 2023
anxolin added a commit that referenced this issue Nov 22, 2023
# Description
Closes #117 

Allows to create both DENY-LISTS, and WHITE-LISTS

For that, this PR introduces the default action, which could be:
`ACCEPT`, `SKIP` or `DROP`

## Config
Now the config files are splitted by environment: `prod` and `staging`

See:
https://github.com/cowprotocol/watch-tower/tree/config

Production files have `DROP` as their default. They will whitelist all
handlers in
https://github.com/cowprotocol/composable-cow#deployed-contracts

Staging will default to index all orders. It will have some exceptions
for orders.

# Test


```bash
LOG_LEVEL=DEBUG,checkForAndPlaceOrder=DEBUG \
  yarn ts-node ./src/index.ts run \
  --chain-config <RPC>,,,https://raw.githubusercontent.com/cowprotocol/watch-tower/config/prod/filter-policy-100.json \
  --page-size 5000 
```


Actually, i can see if I run it with PROd config, is pleasantly not
noisy at all! A bit chat on boot to detect the TWAPs that should be
created. The watch tower realises they were already created and we just
need to schedule next poll. Then it becomes silent!

<img width="1727" alt="image"
src="https://github.com/cowprotocol/watch-tower/assets/2352112/929fcb26-d02d-466d-bb25-ce6d4ae0c298">
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants