bitshares1-core icon indicating copy to clipboard operation
bitshares1-core copied to clipboard

Expired transaction got into a block

Open vikramrajkumar opened this issue 11 years ago • 3 comments

vikram (unlocked) >>> blockchain_get_block 9584
{
  "previous": "74352d12dd29cfe754c45f6dd7bf7bab02613343",
  "block_num": 9584,
  "timestamp": "20140822T180820",
  "transaction_digest": "c8cf12fe3180ed901a58a0697a522f1217de72d04529bd255627a4ad6164f0f0",
  "next_secret_hash": "6ba1c47f95b188282db14dba623b4cd118cccd98",
  "previous_secret": "841acbe21eabe6a0086f77a3e7b499a2c7614493",
  "delegate_signature": "2044e08bd92cd8194f00c129008c49e2aa5f8f95da71903209ea86d1b7323831a74b12f39c5260a52c0ba4328eebedeee65085faafee2b931050b6f62962886dc7",
  "user_transaction_ids": [
    "73fd48a199ba974ead6f28b4bcb99df6143fafac"
  ]
}
vikram (unlocked) >>> blockchain_get_transaction 73fd48a199ba974ead6f28b4bcb99df6143fafac
{
  "trx": {
    "expiration": "20140822T180813",
    "delegate_slate_id": null,
    "operations": [{
        "type": "withdraw_op_type",
        "data": {
          "balance_id": "XTS9FS8Qm3BCES2caGCp7RcVJuk9gwzKGMch",
          "amount": 150000,
          "claim_input_data": ""
        }
      },{
        "type": "deposit_op_type",
        "data": {
          "amount": 100000,
          "condition": {
            "asset_id": 0,
            "delegate_slate_id": 0,
            "type": "withdraw_signature_type",
            "data": {
              "owner": "XTS2YZCMGbFDBJxCDwNSvyj8JcG7MbTHmSEy",
              "memo": {
                "one_time_key": "XTS7377a1EmsAyKxT4WZNaut4HRWNFSxoZyQYmZYkMuxYXpotAcn3",
                "encrypted_memo_data": "df06678c334e9d77a5117be26ee737257336dadf4dd29ffdcdec7d6ec3d84b710acc8ecf70515c58adaf6e8516e25b616aa800403ad15e87c98196cacd868b51"
              }
            }
          }
        }
      }
    ],
    "signatures": [
      "1ff5acf5d6a5acaf1b63496668bc26c18094b6ddefa2f22866d96315a869ffe76420bd279b8e363afdda7311b4043fdda125c6a0d253e72d61b2f3211a7ea326d1"
    ]
  },
  "signed_keys": [],
  "validation_error": null,
  "required_deposits": [],
  "provided_deposits": [[
      "XTS8HPhwgDATo7Gs8yUtYSJK5boCDp23eTF3",{
        "amount": 100000,
        "asset_id": 0
      }
    ]
  ],
  "deposits": [[
      0,{
        "amount": 100000,
        "asset_id": 0
      }
    ]
  ],
  "withdraws": [[
      0,{
        "amount": 150000,
        "asset_id": 0
      }
    ]
  ],
  "balance": [[
      0,
      50000
    ]
  ],
  "net_delegate_votes": [],
  "chain_location": {
    "block_num": 9584,
    "trx_num": 0
  }
}

vikramrajkumar avatar Aug 22 '14 18:08 vikramrajkumar

This is because pending_chain_state::now() returns prev_state->now(). The pending state should be able to optionally have a specific now timestamp set, so when producing a new block, transactions can be evaluated relative to this specific timestamp.

vikramrajkumar avatar Aug 22 '14 19:08 vikramrajkumar

I would say this is low priority; easier to keep out of the next big update.

vikramrajkumar avatar Oct 24 '14 22:10 vikramrajkumar

This can be fixed by allowing to set a "current context" for a pending state, which can be done during block generation. This is also desirable for the light wallet.

vikramrajkumar avatar Feb 08 '15 22:02 vikramrajkumar