Repository navigation
feat: add Docker-native automatic window keeper - #34
Merged
Merged
Conversation
|
🎉🎉🎉 Congratulations on your new release! 🎉🎉🎉 We have created a release draft of the new version, please go to Release to publish it! ✨ |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
Netting 合约需要 operator 在指定区块自动执行窗口冻结与结算,否则结算窗口无法持续推进。
此前各分支分别尝试过 PowerShell、Python WebSocket 和 Java Web3j 实现,但当前 Foundry Docker 镜像不包含对应运行环境。
实现方案
本 PR 使用 POSIX Shell 和 Foundry 自带的
cast实现 keeper,无需额外安装 Python、Java、PowerShell 或第三方依赖。主要改动
automationState()freezeWindow()executeWindow()address-data/addresses.json读取最新 Netting 合约地址keeper服务配置项
ANVIL_BLOCK_TIMENETTING_ADDRESSKEEPER_POLL_SECONDSKEEPER_RETRY_SECONDSKEEPER_MAX_CATCH_UP_ACTIONS使用 Docker Compose 时,
NETTING_ADDRESS可以留空,keeper 会自动读取部署生成的地址文件。验证结果
cast、sh、sed、tr和datecurrentWindowId自动推进至 4,最终automationState()返回false / false启动方式