Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[audit] fix: avoid reprocessing withdrawals #20

Merged
merged 6 commits into from
Jan 4, 2024

Commits on Dec 12, 2023

  1. fix: avoid re-processing withdrawals

    1. check pending nonce and chain nonce before processing
    2. check recently processed using local records before processing
    bendanzhentan committed Dec 12, 2023
    Configuration menu
    Copy the full SHA
    0ff28f1 View commit details
    Browse the repository at this point in the history
  2. feat: update db types BotDelegatedWithdrawal

    1. Rename L2ContractEvent to BotDelegatedWithdrawal
    2. Add unique constraint idx_bot_delegated_withdrawals_transaction_hash_log_index_key
    3. Add new field `InitiatedBlockNumber int64` to indicate the L2 number
       of initiated withdrawal transaction
    3. Add new fields `ProvenTime *Time` and `FinalizedTime *Time` to
       indicate the local time of L1 proven transaction and finalized
       transaction
    4. Modify the `FailureReason` to type `FailureReason *string`
    bendanzhentan committed Dec 12, 2023
    Configuration menu
    Copy the full SHA
    98fa1fe View commit details
    Browse the repository at this point in the history
  3. improve: compare timings of proven and finalized more precisely

    1. Determine the proven timing based on the `L2OutputOracle.latestBlockNumber`
    2. Determine the finalized timing based on the db `proven_time`
    bendanzhentan committed Dec 12, 2023
    Configuration menu
    Copy the full SHA
    a5cd966 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    c274f49 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    494b941 View commit details
    Browse the repository at this point in the history

Commits on Dec 14, 2023

  1. Configuration menu
    Copy the full SHA
    26474e1 View commit details
    Browse the repository at this point in the history