-
Notifications
You must be signed in to change notification settings - Fork 746
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
Remove sequential increment requirements for Child Bounties #4947
Comments
Sorry am not really familiar with the Bounty pallets. Can you post a link maybe to a failed Subscan extrinsic? |
Probably its this https://polkadot.statescan.io/#/extrinsics/20813055-2: They are trying to send two calls in a batch and just guessing the Another way would be to add a custom XCM instruction (probably controversial), since you basically want to get the "return value" of the first call as argument for the second one. |
It doesn't matter if you try to send two calls in one batch. Please review the use case, this will still happen if you are proposing just one transaction in a child bounty, batch or no batch.
This is why the number needs to be a guid (or something else) and not a sequential increasing number |
Apparently this kind of TX fails https://polkadot.subscan.io/multisig_extrinsic/21573048-3?call_hash=0xe9a4e2270847ff97d6be19a4ce66dc3bd6985b7f09381dc28a875d1897e8fd04
|
Hey Oliver, Perhaps I can lend another, maybe more informed perspective on the discussion. To award a child bounty requires several steps, they are as follows:
If followed sequentially it requires at least two signing activities; the first to add a child bounty (step 1) and the second can be a batch which uses the child bounty id obtained in step 1, to fill parameters of steps 2, 3 and 4. If followed in this manner there is no issue. Another aspect of consideration is that the curators of most bounties are multi-sig wallets and the final signature on any given step or batch may be obtained serveral hours after a call is initiated. With this in mind as well as the paragraph above, awarding a child bounty can take days. In practice some curators attempt to batch steps 1 to 4 together and assume that the next child bounty id would be available through out the signing process. With several bounties opening child bounties, there is a highly probability that the child bounty id might be used by another bounty resulting in the batch failing. Birdo is suggesting that a GUID be assigned to child bounties such that the child bounty ID can be predicted and be applied to steps 2, 3 and 4 without worry of collision. Imo, I think his suggestion would solve the problem but not in the most efficient manner. There was some discussion on this in 2023 here. I'd love to take a stab at this as part of my portfolio to enter the fellowship. I think I can code this fairly easily but I'm not familiar with the testing QA/QC aspect. |
If this solves your pain then please go ahead 🙌
Yea just open a merge request and ask for reviews in the public fellowship channel. Tests are always a good idea though 😄 |
Is there an existing issue?
Experiencing problems? Have you tried our Stack Exchange first?
Motivation
When you create a child bounty it needs to have a unique ID, which has to be +1 from the last unique ID in the system.
This is fine if there is only one bounty active at a time, but there are many active bounties and we'll see more and more active bounties coming along. This leads to collisions in transactions, resulting in frustration, delays with sending funds to individuals and lost transaction fees.
Example: I create a child bounty, with the id 135, but it takes the signers on the multisig 24h to review and sign the tx.
If another bounty proposes a child bounty with the ID 135 and it gets signed before mine, my transaction will fail. Now imagine this multiplied by many bounties.
As an individual managing a bounty I have had this problem first hand. I know many other bounty managers also struggle with this design decision from how bounties operate.
Request
I would propose to change the way child bounties operate to not use an incrementing ID across all bounties.
Also ensure that child bounties don't need to be sequentially signed based on when they were raised.
Solution
I would propose to move to a user generated GUID, which would reduce collisions to almost zero, however any alternative approach could work.
Another option could be that child bounties need to start with the main bounty number,
e.g. Bounty 37, child bounty 1 (37-1) which is increased sequentially, this results in zero collisions, proving the bounty manager doesn't make a mistake.
Are you willing to help with this request?
Yes!
The text was updated successfully, but these errors were encountered: