-
Notifications
You must be signed in to change notification settings - Fork 57
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
Bot for automatic merging apprroved RFCs/closing rejected RFCs #21
Comments
To keep things simple, we don’t necessarily need to constantly monitor the chain. We could for example have a github action trigger that takes a block number as input, and manually trigger an action based on the event in that block. In this way we don’t have external server dependency. |
@xlc I'm not sure I understand your proposed workflow. Isn't the idea to have it 100% automated? If it's somewhat manual, then manual close/merge is the simplest solution, if I'm not missing something here. |
It is just like how most of the onchain contracts works. The monitor is offchain and trigger is a permisionless onchain action that verifies some conditions and enforce it. In this case, the monitor is manual, or could be a server, doesn't matter. The trigger is a permisionless Github Action bot. It could be a comment to the PR for example that anyone can do it. It is the bot/GH action verifies if the RP is indeed approved and then perform the merge. The whole point is following the onchain decision, not depending on some specific admins on this repo. |
My two cents is that a manual bot is a better idea, just because it's more simple. If the bot is automatic, that means we need a server, which raises the question of who maintains and monitors the server. The entire point of having a bot is that the process becomes decentralized and not owned by anyone. If someone has to maintain a server, you might as well just ask that person to merge the PRs in this repo instead. Plus, we all know that the server maintenance will be half-assed and that the bot will likely break down all the time. And if the bot breaks down (which will definitely happen at some point if it's automatic), we have to fall back to a manual process anyway. |
Like the bot @rzadp for creating the proposal. I like the idea! |
I already have a working PoC. Demo: xlc#14 |
Looks neat to me. I see it includes the part where you have to look at a block before the referendum is confirmed to read the data. Also this inspires me to change the bot into a GH action, to remove the need of a running server. |
It is a PoC and therefore don’t cover every edge cases. But it is easy to support in-line proposal. The pjs apps UI doesn’t offer a way to create inline proposal other than manual construction. |
I have ported my thing to work as a GitHub Action. Here it is in action: paritytech/rfc-action#5 |
So what's the next step? Should we collaborate on rfc-propose or fellowship-rfc-process-bot? Should we start to integrate one into here? |
What kind of feedback you want? :D I mean from the first look, it seems to be okay. |
Well, you can't do that unless you iterate over every single block that has been authored since the RFC has been proposed (assuming the bot could know when the RFC has been proposed), which takes a large amount of time and bandwidth. Also, correct me if I'm wrong, but you're looking into the block storage (the list of events) to determine whether an RFC has been approved, meaning that you specifically need to target an archive node. In general I feel like remarks are a very very poor mechanism, especially when triggered through a referendum instead of being included in a block body (block bodies are kept forever by every node). |
To give some feedback: I've been in the Polkadot ecosystem for 6 years, and I've been using PolkadotJS extensively, and despite that I literally have no idea how to open this referendum, pragmatically speaking. I feel like some more detailed instructions wouldn't hurt. |
I guess we can close it per https://github.com/paritytech/opstooling/issues/283 |
This repository is private and inaccessible for anyone non-Parity. |
After RFCs are approved on chain, they can be merged directly. This should be done by a bot and should not require any manual intervention. The same applies for rejects.
The bot should monitor the fellowship referenda for referendums that want to enact a
remark
withRFC_APPROVE
orRFC_REJECT
. The exact process on how a referendum is executed, is documented in theREADME
. After the referendum was approved, the bot should do the appropriate action(merge forRFC_APPROVE
and close forRFC_REJECT
).The text was updated successfully, but these errors were encountered: