rchain-community / rchat-fork

Apache License 2.0
0 stars 0 forks source link

mirror doesn't ensure order nor delivery #3

Open dckc opened 4 years ago

dckc commented 4 years ago

The code to mirror postgres events to RChain doesn't ensure that the contract returns success.

https://github.com/rchain-community/rv2020/blob/41318189b5eba92b7b5a9586e871b05d6e90af02/rchat/chain_replica.js#L113

Nor does it ensure that the updates are executed in order.

dckc commented 4 years ago

The RChain deploy and such is currently async w.r.t. the DB operation. I think triggers can cause DB operations to fail, though the performance implication of putting an RChain contract execution (which currently takes around 3 minutes) in the critical path of each DB operation seems pretty drastic.