mesg-foundation / engine

Build apps or autonomous workflows with reusable, shareable integrations connecting any service, app, blockchain or decentralized network.
https://mesg.com/
Apache License 2.0
130 stars 13 forks source link

Fix account sequence desynchronisation when error #1762

Closed NicolasMahe closed 4 years ago

NicolasMahe commented 4 years ago

Fixes https://github.com/mesg-foundation/engine/issues/1693

This PR make the lcd and rpc clients to only increase the account sequence when the transaction is ok.

antho1404 commented 4 years ago

Seems valid, could you run the perf tests and check the result on the grafana to see the impact of such a modification, the before/after visualization for let's say 1000 executions would be great

NicolasMahe commented 4 years ago

Seems valid, could you run the perf tests and check the result on the grafana to see the impact of such a modification, the before/after visualization for let's say 1000 executions would be great

Same speed on the e2e tests with 10 executions: Before:

        --- PASS: TestAPI/execution/many_executions_in_parallel (1.65s)
            --- PASS: TestAPI/execution/many_executions_in_parallel/create_executions (0.60s)
            --- PASS: TestAPI/execution/many_executions_in_parallel/check_in_progress (0.02s)
            --- PASS: TestAPI/execution/many_executions_in_parallel/check_completed (1.03s)

After:

        --- PASS: TestAPI/execution/many_executions_in_parallel (1.59s)
            --- PASS: TestAPI/execution/many_executions_in_parallel/create_executions (0.56s)
            --- PASS: TestAPI/execution/many_executions_in_parallel/check_in_progress (0.02s)
            --- PASS: TestAPI/execution/many_executions_in_parallel/check_completed (1.02s)