dreamcatcher-tech / dreamcatcher-stack

https://dreamcatcher.land
1 stars 0 forks source link

Worker that tries to open all paths #179

Open inverted-capital opened 10 months ago

inverted-capital commented 10 months ago

This would be the same for local chains as well as remote.

Needs to run out of the pulse cycle so that it does not delay pulse making.

Once completed, it would inject back in the resolutions and make any adjustments, possibly causing a run of the pulse if it allowed some actions to take place.

Local should probably be looked up during pulse time, since this is guaranteed to resolve, and we should just get quick at doing the lookup. Remote may never resolve and so seems reasonable to always take one whole block to resolve.

If we had the remote cached locally, then we would do it instantly, but this introduces non determinism for no reason.

Then the Engine reducer needs to handle having channels that resolve to an address that they already had - this will involve readdressing all the requestIds, and any piercings or effects.

inverted-capital commented 10 months ago

It should be that, to open a new channel requires a full pulse. This means that the pulse always seals before the channel is resolved, which gives consistent behaviour no matter how fast or slow the pulse resolution process is. This may be slower than doing the resolution in band with pulsing, but consistency is more valuable.