Skip to content

Remove getReceipt from execution #398

@kheil117

Description

@kheil117

Problem

when calling execute() on a transaction, the sdk submits the transaction AND wait for network confirmation.
other sdks (like js) only submit the transaction and then let user call getReceipt if they want to

I propose to remove the network confirmation check inside the execute function.
execute function should only check for submission error like timeout

current behavior:
when submitting a transaction via execute()
_should_retry function performs two checks:

  1. checks response.transactionGetReceipt.header.nodeTransactionPrecheckCode, which returns code 0 (OK) if correctly submitted
  2. checks response.transactionGetReceipt.receipt.status which returns code 21 until the transaction is confirmed.

Until both checks are passed, the framework resubmits the transaction.

Solution

Remove network confirmation from execution function or set it as optional
Re submit transaction to network only if precheck error node or timeout

Alternatives

No response

Metadata

Metadata

Assignees

Labels

Blockchain / DLTIssues engineering distributed ledger functionalityadvancedrequires knowledge of multiple areas in the codebase without defined steps to implement or examplesenhancementNew feature or requestpythonUses Python programming language

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions