Giter Club home page Giter Club logo

Comments (5)

Earlz avatar Earlz commented on July 17, 2024

Do you have a stacktrace from the honest node?

from qtum.

Earlz avatar Earlz commented on July 17, 2024

@davidjaenson can you add an automated test for this case? Basically ensure that CheckBlock and AcceptBlock rejects a PoS block with no coinstake tx

from qtum.

davidjaenson avatar davidjaenson commented on July 17, 2024
#0  0x00005555557dad94 in CTransaction::IsCoinStake (this=0x74) at ./primitives/transaction.h:397
#1  0x00005555557b6a77 in CheckBlock (block=..., state=..., consensusParams=..., 
    fCheckPOW=fCheckPOW@entry=true, fCheckMerkleRoot=fCheckMerkleRoot@entry=true, 
    fCheckSig=fCheckSig@entry=true) at validation.cpp:3546
#2  0x000055555582da48 in PartiallyDownloadedBlock::FillBlock (this=0x7fffac403710, block=..., 
    vtx_missing=std::vector of length 0, capacity 0) at blockencodings.cpp:202
#3  0x00005555556dda15 in ProcessMessage (pfrom=0x7fffac000020, pfrom@entry=0x7fffbb7fce40, 
    strCommand="blocktxn", vRecv=..., nTimeReceived=nTimeReceived@entry=93825004973920, chainparams=..., 
    connman=..., interruptMsgProc=...) at net_processing.cpp:2183
#4  0x00005555556de894 in ProcessMessage (pfrom=0x7fffbb7fce40, pfrom@entry=0x7fffbc0008c0, 
    strCommand="cmpctblock", vRecv=..., nTimeReceived=93825004973920, chainparams=..., connman=..., 
    interruptMsgProc=...) at net_processing.cpp:2136

The problem appears to be at
https://github.com/qtumproject/qtum_new/blob/ce3e47d30c9b26e1ee9b36a978664f0ba0a7107e/src/validation.cpp#L3546
which has the potential for being an out of range access

from qtum.

Earlz avatar Earlz commented on July 17, 2024

I was able to repro it and fixed that specific area, look at my latest PR

from qtum.

Earlz avatar Earlz commented on July 17, 2024

Fixed by #144

from qtum.

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.