Skip to content
This repository has been archived by the owner on Mar 5, 2024. It is now read-only.

Codify implicit sorting of oracle submissions before txn close & fix … #678

Merged
merged 1 commit into from
Nov 17, 2020

Commits on Nov 17, 2020

  1. Codify implicit sorting of oracle submissions before txn close & fix …

    …issue
    
    The implicit txn ordering behaviour if a transaction did not have a
    defined sort order can cause instability in the sort order when a new
    transaction is added, because the undefined sort order was the same as
    the last sort order. This could lead to the transaction without a
    defined sort order sorting before the transaction with a defined sort
    order (because of the other sort dimensions like nonces, etc).This means
    that adding another transaction to the end of the sort order list would
    cause the transaction with the implicit sort order to definitely sort
    after the transaction it may have sorted before earlier, invalidating
    the block.
    
    This change establishes a definitive sort order for the oracle price
    report txn to mirror the implicit sort order before the addition of the
    hotspot transfer function. Additionally it makes the undefined sort
    order one past the maximum to prevent this bug recurring and it add a
    log message to the sync_handler to make this failure clearer.
    
    This *may* expose other implicit sort ordering bugs, so a thorough
    resync (or at least ordering check of txns in blocks) is recommended.
    Vagabond committed Nov 17, 2020
    Configuration menu
    Copy the full SHA
    499a932 View commit details
    Browse the repository at this point in the history