Skip to content
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

new transaction: set process duration #189

Open
p4u opened this issue Jun 19, 2024 · 2 comments
Open

new transaction: set process duration #189

p4u opened this issue Jun 19, 2024 · 2 comments
Labels
enhancement New feature or request extra-feature

Comments

@p4u
Copy link
Member

p4u commented Jun 19, 2024

With this transaction, we can now modify the duration of an existing process (while in READY or PAUSE state).

If interruptible=false the duration can only be extended.

The cost of the transactions is computed dynamically by: max(newPrice - previousPrice, txBaseCost)

The required new fields already exist on the protobuf models (they were added some weeks ago), so the SDK should have already everything available.

The new transaction is of type: SetProcessTx / SET_PROCESS_DURATION
https://github.com/vocdoni/dvote-protobuf/blob/master/src/vochain/vochain.proto#L168

The new field is uint32 duration and represents seconds.
https://github.com/vocdoni/dvote-protobuf/blob/master/src/vochain/vochain.proto#L218

The duration is added to startTime to compute the new endTime: endTime = startTime + duration

EndTime cannot be lower than the current blockchain time, and duration must be different from zero.

PS: it would be great to add this feature to the UI, so the process end time can be set at any moment by the organizer or a delegate. cc/ @jpaulet

@p4u p4u added the enhancement New feature or request label Jun 19, 2024
@p4u
Copy link
Member Author

p4u commented Jun 19, 2024

PR: vocdoni/vocdoni-node#1344

@marcvelmer
Copy link

Done in the SDK

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request extra-feature
Projects
None yet
Development

No branches or pull requests

3 participants