Zilliqa / zq2

Zilliqa 2.0 code base
Apache License 2.0
9 stars 0 forks source link

Question: Is it possible to make transactions (almost) instant on ZQ2, similar to the MANUAL_MODE flag in ZQ1? #1836

Open PurrProof opened 2 days ago

PurrProof commented 2 days ago

Issue: Delayed Transaction Confirmation on ZQ2

Description
I'm testing some contracts on ZQ2. While deployments work and transactions execute successfully, the transactions are not confirmed instantly. It takes around 2-3 seconds for confirmation.

In the ZQ1 isolated server, I recall there being a flag (similar to MANUAL_MODE) that could make transactions almost instant. However, in ZQ2, I'm running the setup as per the documentation using docker-compose up with the provided docker-compose.yaml file.


Current Behavior

  1. Transaction Submission:

    {
       "id": 0,
       "jsonrpc": "2.0",
       "result": {
           "Info": "Txn processed",
           "TranID": "dee53a1df54caff0f679b02181cf847c836a5abc122c5e508553ca3f032563da"
       }
    }
  2. Repeated Query for Txn Confirmation:

    {
       "error": {
           "code": -20,
           "message": "Txn Hash not Present"
       },
       "id": 0,
       "jsonrpc": "2.0"
    }
  3. Final Confirmation After Delay (~2-3 seconds):

    {
       "id": 0,
       "jsonrpc": "2.0",
       "result": {
           "ID": "dee53a1df54caff0f679b02181cf847c836a5abc122c5e508553ca3f032563da",
           "amount": "10000000",
           "gasLimit": "50000",
           "gasPrice": "2000000016",
           "nonce": "5",
           "receipt": {
               "accepted": false,
               "cumulative_gas": "50",
               "epoch_num": "183",
               "event_logs": [],
               "success": true,
               "transitions": []
           },
           "senderPubKey": "0x02c6047f9441ed7d6d3045406e95c07cd85c778e4b8cef3ca7abac09b95c709ee5",
           "signature": "0x6b59e3a2e1b7b0cad0146da4a42b660b361fabeae87642f6bac4337b72ad90a2822f6a7fb5dc07b99142acbae5d59e3bbb504d6ab0b5fb75ad64610e5ff4e248",
           "toAddr": "4baf5fada8e5db92c3d3242618c5b47133ae003c",
           "version": "45875201"
       }
    }

Expected Behavior

Transactions should be processed and confirmed almost instantly, similar to the behavior in ZQ1 with MANUAL_MODE or a similar configuration.


Environment


Question

Is there a workaround or a flag in ZQ2 to achieve near-instant transaction confirmation, as was possible in ZQ1?