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

core: check the signers of on-chained conflicting transaction during new transaction verification #3061

Merged
merged 3 commits into from
Jul 21, 2023

Commits on Jul 21, 2023

  1. core: remove unused blockchain API

    `(*Blockchain).HasTransaction` is one of the oldest methods in our
    codebase, and currently it's completely unused. I also doubt that
    this method works as expected because it returns `true` if transaction
    in the mempool.
    
    Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
    AnnaShaleva committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    0a2be89 View commit details
    Browse the repository at this point in the history
  2. core: fix formatted error on transaction verification

    Witnesses are not yet created by the moment we return this error,
    thus, it was always 0 as an actual number of witnesses in
    ErrInvalidWitnessNum.
    
    Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
    AnnaShaleva committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    0d17273 View commit details
    Browse the repository at this point in the history
  3. core: check signers of on-chained conflict during new tx verification

    During new transaction verification if there's an on-chain conflicting
    transaction, we should check the signers of this conflicting transaction.
    If the signers intersect with signers of the incoming transaction, then
    the conflict is treated as valid and verification for new incoming
    transaction should fail. Otherwise, the conflict is treated as the
    malicious attack attempt and will not be taken into account;
    verification for the new incoming transaction should continue.
    
    This commint implements the scheme described at
    neo-project/neo#2818 (comment),
    thanks to @shargon for digging.
    
    Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
    AnnaShaleva committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    ee4b8f8 View commit details
    Browse the repository at this point in the history