-
Notifications
You must be signed in to change notification settings - Fork 277
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
[BUG]: Trigger's execution queue is cleared on a new block #4429
Comments
As discussed with @Mingela iroha now works in permissioned setups so having recussion problems is OK, it's operator responsibility to control this. |
Signed-off-by: Shanin Roman <shanin1000@yandex.ru>
Signed-off-by: Shanin Roman <shanin1000@yandex.ru>
For the public mode the target solution should be designed thoroughly. I object inability of trigger chain calls, that's a huge flexibility/optimization opportunity. Some points to consider:
|
this is quite hard to prevent at the time of registering trigger, if not impossible because we don't know what events a trigger will produce when executed. Even if we did we don't know under which conditions an event is produced and whether these conditions will coincide with conditions of another trigger to create positive feedback loop |
also, it's possible that positive feedback loop will be self dampening due to changing conditions in the blockchain. So it may only be temporary and not create a problem for blockchain operation |
Signed-off-by: Shanin Roman <shanin1000@yandex.ru>
Signed-off-by: Shanin Roman <shanin1000@yandex.ru>
@mversic the bug is fixed, but we have potential problem with positive feedback loop. |
Currently it's not possible to create trigger execution chain.
So that events produced in one trigger would be consumed in another trigger (or in the same trigger) in the next block.
Fix itself is pretty simple we need clone
matched_ids
inimpl Clone
atcore/src/smartcontracts/isi/triggers/set.rs
.But this fix leads to infinite recursion problem.
If trigger produces
>1
event it can consume later it execution would grow exponentially.This would work not only with the single trigger but with any set of triggers which are "calling" each other.
The text was updated successfully, but these errors were encountered: