Git Product home page Git Product logo

Comments (2)

Jim8y avatar Jim8y commented on August 19, 2024 1

We need a solid IDS with a group of rules. before that, i dont think doing something like banning ip or having a black list will work. @shargon how do you think?

from neo.

cschuchardt88 avatar cschuchardt88 commented on August 19, 2024

Well this happens when evil server sends (see below) and never disconnects. Does GetHeaders message for 1000s of iterations than stops and does 1 GetBlockByIndex, 12 GetAddr and then asks for GetHeaders again, continuously over and over again.

new Header()
{
    Index = 4605403u,
    MerkleRoot = UInt256.Parse($"0x0000000000000000000000000000000000000000000000000000000000000000"),
    NextConsensus = UInt160.Parse($"0x0000000000000000000000000000000000000000"),
    Nonce = 2083236893,
    PrevHash = UInt256.Parse($"0x0000000000000000000000000000000000000000000000000000000000000000"),
    Timestamp = new DateTime(2016, 7, 15, 15, 8, 21, DateTimeKind.Utc).ToTimestampMS(),
    Version = 0,
    Witness = new()
    {
        InvocationScript = Array.Empty<byte>(),
        VerificationScript = new[] { (byte)0x11 },
    },
};

My Thoughts

  • Disconnect on invalid index sequence. For example, if node is at block 0 and node gets block 353826 (this isn't development node, so need to fast forward?)
  • Disconnect on invalid range of timestamp on next 10x blocks and than resets on success. Also have this number be random for number of times (instead of 10).
  • Actually check current prevhash with sent one (On the block/header).

from neo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.