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

WiP: Verify that previous ATX points to correct ATX when handling incoming ATXs #7

Closed
wants to merge 11 commits into from

Conversation

fasmat
Copy link
Member

@fasmat fasmat commented Apr 4, 2024

Motivation

Fixes GHSA-jcqq-g64v-gcm7

Description

  • The Previous ATX is now verified to be from the same NodeID
    • if it is not it is a syntactic invalidity, the ATX is discarded and the peer that broadcasted the ATX will be dropped
  • The activation.Handler now marks a NodeID as malicious if it produces two ATXs pointing to the same previous ATX
  • A new malfeasance proof type was added that proofs that two different ATXs by the same smesher point to the same previous ATX
  • Node can now be instructed to verify existing ATXs in the DB which will create and broadcast malfeasance proofs for every ATX that was found to be invalid, but no existing malfeasance proof is available
    • TODO: add command line flag that needs to be set to run this code explicitly
    • TODO: store progress in local DB instead of starting from the beginning every time

Test Plan

  • tests were added for the new behaviour
  • existing tests where updated where needed

TODO

  • Explain motivation or link existing issue(s)
  • Test changes and document test plan
  • Update documentation as needed
  • Update changelog as needed

@fasmat fasmat self-assigned this Apr 4, 2024
@fasmat fasmat force-pushed the advisory-fix-1 branch 7 times, most recently from 9ac41c9 to 23143da Compare April 10, 2024 21:34
@fasmat
Copy link
Member Author

fasmat commented Apr 29, 2024

superseded by #27

@fasmat fasmat closed this Apr 29, 2024
@fasmat fasmat deleted the advisory-fix-1 branch April 29, 2024 21:17
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant