Neo: Parallel verification issues

Created on 16 Jan 2020  路  4Comments  路  Source: neo-project/neo

Describe the bug
While reviewing the bug #1410 I used multiple threads for the rpc request and I advice that it produce a similar denial of services that is described in #1410

The error was produced here https://github.com/neo-project/neo/blob/fc1a64b77c8a901c048e7b973f204d3b7c9870e3/src/neo/Ledger/Blockchain.cs#L500
image

Because a double spend in Gas native token https://github.com/neo-project/neo/blob/fc1a64b77c8a901c048e7b973f204d3b7c9870e3/src/neo/SmartContract/Native/Tokens/Nep5Token.cs#L100

image

To Reproduce
Steps to reproduce the behavior:

  1. Create a 1 node network
  2. install rpc module
  3. open wallet by rpc
  4. send multiple sends with at least 5 threads
{
  "jsonrpc": "2.0",
  "method": "sendtoaddress",
  "params": ["0x8c23f196d8a1bfd103a9dcb1f9ccf0c611377d3b", "NNa1Fgc82Qoh65TJfViqC92W8Z8AWL9YKA",0.00000001],
  "id": 1
}

Expected behavior
Consensus nodes are expected to handle massive txs.

Additional context
Possible fix https://github.com/neo-project/neo/pull/1417

bug critical

Most helpful comment

I think this is the reason, I'll test it.
image

All 4 comments

I think this is the reason, I'll test it.
image

That make sense, we need to recheck the balance after parallelVerify.

@Tommo-L If it's scenario, it's not related to parallel verification because TX1 and TX2 can enter in mempool with balance, and later transfer his funds to other address, when they enter in the block, the second one can produce the same behaviour.

No, it's related to parallel verification.

If the transaction will transfer his funds to other address, it'll update the mempool after persisted by Mempool.UpdatePoolForBlockPersisted

Was this page helpful?
0 / 5 - 0 ratings

Related issues

roman-khimov picture roman-khimov  路  3Comments

borovik96 picture borovik96  路  4Comments

igormcoelho picture igormcoelho  路  3Comments

erikzhang picture erikzhang  路  4Comments

canesin picture canesin  路  3Comments