Summary
Originally proposed in #2552 (closed in favor of this issue).
When a state transition broadcast fails, DAPI checks the mempool to provide a detailed error. Currently it fetches the entire mempool to confirm the transaction is present, which is unnecessarily expensive.
Proposed change
- Fetch a specific unconfirmed transaction instead of the entire mempool when detecting duplicate transactions during a state transition broadcast.
Affected areas
packages/dapi/lib/grpcServer/handlers/platform/broadcastStateTransitionHandlerFactory.js
packages/dapi/test/unit/grpcServer/handlers/platform/broadcastStateTransitionHandlerFactory.spec.js
Notes
The original PR (#2552) targeted v2.1-dev and also bumped the tenderdash Docker image version in dashmate config (plus a config migration). When revisiting this, retarget to the current development branch and re-evaluate whether the tenderdash bump is still needed.
Closed PR for reference: #2552
Summary
Originally proposed in #2552 (closed in favor of this issue).
When a state transition broadcast fails, DAPI checks the mempool to provide a detailed error. Currently it fetches the entire mempool to confirm the transaction is present, which is unnecessarily expensive.
Proposed change
Affected areas
packages/dapi/lib/grpcServer/handlers/platform/broadcastStateTransitionHandlerFactory.jspackages/dapi/test/unit/grpcServer/handlers/platform/broadcastStateTransitionHandlerFactory.spec.jsNotes
The original PR (#2552) targeted
v2.1-devand also bumped the tenderdash Docker image version in dashmate config (plus a config migration). When revisiting this, retarget to the current development branch and re-evaluate whether the tenderdash bump is still needed.Closed PR for reference: #2552