-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# Description This PR adds a new optional config parameter to each network, allowing us to define some block throttling. the setting is called `processEveryNumBlocks` : * Throttle block processing to only process blocks every N blocks. Set to 1 to process every block, 2 to process every other block, etc. Also, note that even if we skip a block, it doesn't mean we don't have any work on it. We still need to check if there's new orders coming in. So what is actually skipped is only the programmatic order checks and posting orders. Also, it persists all Prometheus metrics, so it should count as a "consumed block" for our consumption rate alerts, meaning we should see the block consumption rate progressing faster. <img width="1708" alt="image" src="https://github.com/user-attachments/assets/3e4e9b96-c141-416d-b399-e315abc355f8"> This is an example on how to use it: `"processEveryNumBlocks": 40,` This would do polling and post orders once every 40 blocks. In arbitrum this should be every 8 seconds ```yaml { "networks": [ { "name": "arbitrum-one", "rpc": "wss://your-rpc/arbitrum", "deploymentBlock": 204704802, "processEveryNumBlocks": 40, "filterPolicy": { "defaultAction": "DROP", "handlers": { "0x44569Cbd4E10dd5e97293337964Eff32d58ed352": "ACCEPT", "0x519BA24e959E33b3B6220CA98bd353d8c2D89920": "ACCEPT", "0x6cF1e9cA41f7611dEf408122793c358a3d11E5a5": "ACCEPT", "0xd3338f21c89745e46af56aeaf553cf96ba9bc66f": "ACCEPT", "0xE8212F30C28B4AAB467DF3725C14d6e89C2eB967": "ACCEPT", "0xB148F40fff05b5CE6B22752cf8E454B556f7a851": "ACCEPT" } }, "watchdogTimeout": 120 } ] } ```
- Loading branch information
Showing
4 changed files
with
47 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM node:alpine AS build | ||
FROM node:22.2-alpine AS build | ||
|
||
WORKDIR /usr/src/app | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters