bitshares / bitshares/bsips

New BSIP: reject proposal_update_operation if the proposal may get approved but fail to execute immediately

Open
#113 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
59
Forks
86
PR merge metrics
No merged PRs in 30d

Description

https://github.com/bitshares/bitshares-core/issues/278

Current behavior (copied from the issue):
> When updating a proposal (add or remove approvals) without a review period(e.g. committee proposals which will only execute on expiration), if the authority threshold is met after the update, the proposal will be tried to execute immediately. If the execution failed, for example due to insufficient fee, the proposal will be left there waiting for future update, or expiration. It will be tried to execute again after another update if still has enough approvals. It will be tried again on expiration. Related code is [here](https://github.com/bitshares/bitshares-core/blob/2.0.160328/libraries/chain/proposal_evaluator.cpp#L177-L183)
>
> ![](https://cloud.githubusercontent.com/assets/410789/25841900/3bc0f1de-34a2-11e7-9a7b-90e799b5b106.png)

This behavior has confused users, and sometimes it may cause unexpected results E.G. duplicate transfers.

A better behavior proposed by @xhipster:
> I suppose that proper behavior is not to confirm approval in this case

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with linked core issue 278 and the proposal_evaluator.cpp entry point cited in the report. Trace proposal_update_operation when an approval threshold is met and immediate execution fails, then review the existing tests around proposal updates and execution. Done means the behavior matches the proposed handling and cases such as duplicate transfers are covered.

Written by the indexing model from the issue text.

Assessment

Tech stack
blockchain
Domain
blockchain
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.