From d78551369e29760609cd07727c52b5f86004510a Mon Sep 17 00:00:00 2001 From: Xavier Lau Date: Mon, 26 Jun 2023 21:21:19 +0800 Subject: [PATCH] Amend Slothunter milestone deliverables (#1822) Signed-off-by: Xavier Lau --- applications/slothunter.md | 78 +++++++++++++++++++------------------- 1 file changed, 39 insertions(+), 39 deletions(-) diff --git a/applications/slothunter.md b/applications/slothunter.md index e1fbe510309..ff9ebc9a726 100644 --- a/applications/slothunter.md +++ b/applications/slothunter.md @@ -22,45 +22,44 @@ And this also could help teams/users to bid/contribute automatically. ### Details(spec) -Slothunter will be implemented in Rust, which means it will be efficient and stable while running as a system service. +Slothunter will be implemented in Rust, ensuring efficiency and stability when running as a system service. -This grant contains 7 parts. +This grant comprises 7 parts: 1. Monitor the auction state. - 1. This program will run as a system service. + 1. The program will run as a system service. 2. It will fetch and cache the chain state periodically. 2. Calculate the current winner. - 1. Base on previous data, calculate the current auction winner. + 1. Based on the latest on-chain data, the current auction winner will be calculated. 3. Email and webhook notifications. - 1. It could notify the users: - 1. New auction started. - 2. Insufficient fund for bidding/contributing. - 3. Stop bidding/contributing and reason. - 4. New winner. - 5. Auction ended. - 2. The email and webhook addresses are configurable. - 3. The notification will be logged in the terminal by default. - 4. The email/webhook notification can be enabled or disabled by user. e.g. Some users think the email is annoying. - 5. All the notification content will be present in json style. - 6. Webhook notification can be integrated to Slack, Telegram, etc. e.g. the telegram bot will provide a listen address and Slothunter will push the notification to the bot periodically. + 1. The notifications will inform users about: + 1. New auctions starting. + 2. New bids/contributions. + 3. Stopping bids/contributions and the reasons. + 4. Current block winners. + 5. Auction endings. + 2. Email and webhook addresses are configurable. + 3. Notifications will be logged in the terminal by default. + 4. Users can enable or disable email/webhook notifications. e.g., Some users may find emails annoying. + 5. All notification content will be presented in JSON format. + 6. Webhook notifications can be integrated with Slack, Telegram, etc., e.g., a Telegram bot will provide a listening address, and Slothunter will push notifications to the bot periodically. 4. Auto bidding/contributing. - 1. Auto bid/contribute if there is new winner. And the bot will stop if the new winner's price is greater than the max acceptable value in the configuration file. - 2. Able to use regular account to bid/contribute. - 3. Able to use proxy account to bid/contribute. -5. Customize bidding/contributing strategy, including: - 1. Set max acceptable value. - 2. Set bidding/contributing frequency every `x` blocks. + 1. The bot will auto bid/contribute when there's a new winner and stop if the new winner's price exceeds the maximum acceptable value in the configuration file. + 2. Proxy accounts can be used for bidding/contributing. +5. Customize bidding/contributing strategies, including: + 1. Setting a maximum acceptable value. + 2. Setting bidding/contributing increments. 6. Provide a config.toml to configure: 1. Relaychain. 2. Bidding/contributing account. - 3. Bidding/contributing amount, target and max acceptable price. - 4. Keep bidding/contributing every `x` blocks. - 5. Notification mailbox. - 6. Webhook URI. -7. A Telegram bot, this should be easily deployed on any ubuntu:20.04+ server. + 3. Bidding/contributing target, amount, and maximum acceptable price. + 4. Notification email sender and receivers. + 5. Notification webhooks. +7. A Telegram bot that can be easily deployed on any Ubuntu 20.04+ server. + +Teams/users can start the bot before the auction, and everything should proceed as expected. +Teams/users can deploy the Telegram bot and receive the latest auction status in a group. -Teams/users could start the bot before the auction. And all the things should go as expected. -Teams/users could deploy the telegram bot and get latest auction status in group. ## Team :busts_in_silhouette: @@ -117,16 +116,16 @@ If they contain no activity, references to projects hosted elsewhere or live are - **FTE:** 1 - **Costs:** 10,000 USD -| Number | Deliverable | Specification | -| -----: | -------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| 0a. | License | GPLv3 | -| 0b. | Documentation | There will be a guide to tell people how to use this. | -| 0c. | Testing guide | There will be a docker file and a guide to tell the auditor how to run the tests. It will guide you how to setup an auction and do the tests. | -| 1. | Auction winner calculator | Based on the 0c., run the binary, you should see the current winner from the terminal log. | -| 2. | Notification component | Based on the 0c., run the binary, you should receive these notification correctly. | -| 3. | Auto bidding/contributing component | Based on the 0c., run the binary, you should see you are bidding/contributing your parathread from the Polkadot Apps. | -| 4. | Bidding/contributing configuration component | Based on the 3., you can customize your bidding/contributing strategy in a toml file, you should see your bidding/contributing behavior works the same as the strategy defined. | -| 5. | Releases | Linux, macOS, Windows prebuilt binaries, and crates.io release. | +| Number | Deliverable | Specification | +| -----: | ----------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| 0a. | License | GPLv3 | +| 0b. | Documentation | There will be a guide to tell people how to use this. | +| 0c. | Testing guide | There will be a docker file and a guide to tell the auditor how to run the tests. It will guide you how to setup an auction and do the tests. | +| 1. | Auction winner calculator | Based on the 0c., run the binary, you should see the current winner from the terminal log. | +| 2. | Notification component | Based on the 0c., run the binary, you should receive these notification correctly. | +| 3. | Auto bidding/contributing component | Based on the 0c., run the binary, you should see you are bidding/contributing your parathread from the Polkadot Apps. | +| 4. | Slothunter configuration component | Based on the 3., you can customize your bidding/contributing strategy in a toml file, you should see your bidding/contributing behavior works the same as the strategy defined. | +| 5. | Releases | Linux, macOS, Windows prebuilt binaries, and crates.io release. | ### Milestone 2 Slothunter notification Slack/Telegram bot setup guide @@ -139,7 +138,8 @@ If they contain no activity, references to projects hosted elsewhere or live are | 0a. | License | GPLv3 | | 0b. | Documentation | There will be a guide to tell people how to use this. | | 0c. | Testing guide | There will be a guide to tell the auditor how to run the tests. | -| 1. | Workshop repository | Follow the tutorial in this repository to setup the bot, and you should see the notification appear in Slack and Telegram. | +| 1. | Telegram bot. | A telegram bot program to receive the auction notification and easy to deploy on any Ubuntu 20.04+ server. | +| 2. | Workshop repository | Follow the tutorial in this repository to setup the bot, and you should see the notification appear in Slack and Telegram. | ## Future Plans