solana/ledger
behzad nouri 3f63ed9a72
removes OrderedIterator and transaction batch iteration order (#16153)
In TransactionBatch,
https://github.com/solana-labs/solana/blob/e50f59844/runtime/src/transaction_batch.rs#L4-L11
lock_results[i] is aligned with transactions[iteration_order[i]]:
https://github.com/solana-labs/solana/blob/e50f59844/runtime/src/bank.rs#L2414-L2424
https://github.com/solana-labs/solana/blob/e50f59844/runtime/src/accounts.rs#L788-L817

However load_and_execute_transactions is iterating over
  lock_results[iteration_order[i]]
https://github.com/solana-labs/solana/blob/e50f59844/runtime/src/bank.rs#L2878-L2889
and then returning i as for the index of the retryable transaction.

If iteratorion_order is [1, 2, 0], and i is 0, then:
  lock_results[iteration_order[i]] = lock_results[1]
which corresponds to
  transactions[iteration_order[1]] = transactions[2]
so neither i = 0, nor iteration_order[i] = 1 gives the correct index for the
corresponding transaction (which is 2).

This commit removes OrderedIterator and transaction batch iteration order
entirely. There is only one place in blockstore processor which the
iteration order is not ordinal:
https://github.com/solana-labs/solana/blob/e50f59844/ledger/src/blockstore_processor.rs#L269-L271
It seems like, instead of using an iteration order, that can shuffle entry
transactions in-place.
2021-03-31 23:59:19 +00:00
..
benches Add limit and shrink policy for recycler (#15320) 2021-02-24 00:15:58 -08:00
src removes OrderedIterator and transaction batch iteration order (#16153) 2021-03-31 23:59:19 +00:00
tests Re-allow clippy::integer_arithmetic at crate-level 2021-02-17 13:55:08 -07:00
.gitignore system_instruction_processor updates (#6448) 2019-10-19 18:23:27 -07:00
Cargo.toml Bump tokio to 1.1 (#15926) 2021-03-16 21:32:50 +00:00
build.rs adds crds-value for broadcasting duplicate shreds through gossip (#14133) 2020-12-18 14:32:43 +00:00