Giter VIP home page Giter VIP logo

Comments (5)

alamshafil avatar alamshafil commented on July 22, 2024

4.1 is ready for release, building binaries now.

from avian.

alamshafil avatar alamshafil commented on July 22, 2024

4.1 has been released!

from avian.

crackfoo avatar crackfoo commented on July 22, 2024

Why does getblocktemplate complain:

error -1: createnewblock: testblockvalidity failed: bad-cb-amount (code 16)

wallet debug says

2022-10-05 22:38:26 ERROR: ConnectBlock(): coinbase pays too much (actual=262500000000 vs limit=250000000000)
2022-10-05 22:38:26 ERROR: TestBlockValidity: Consensus::ConnectBlock: bad-cb-amount (code 16)

but I'm not even submitting a block... just asking for the template....

from avian.

alamshafil avatar alamshafil commented on July 22, 2024

To properly assist you, make sure you running Avian 4.1 on commit 53947c4.

On my local node I was able to run the below without any issues:

  • getblocktemplate
  • getblocktemplate "{\"powalgo\": \"minotaurx\"}"
  • getblocktemplate "{\"powalgo\": \"x16rt\"}"

Keep in mind that dev fee is already subtracted from coinbasevalue, ex: 237500000000.

From the value 262500000000, it looks like 5% of 2500 (125) was added to coinbase subsidy of 2500 (2625).

It is odd that your gbt is adding to coinbase. This is the code that checks coinbase: (AreEnforcedValuesDeployed() is always true)

Avian/src/validation.cpp

Lines 2805 to 2811 in 53947c4

CAmount blockReward = nFees + GetBlockSubsidy(pindex->nHeight, chainparams.GetConsensus());
if (block.vtx[0]->GetValueOut(AreEnforcedValuesDeployed()) > blockReward)
return state.DoS(100,
error("ConnectBlock(): coinbase pays too much (actual=%d vs limit=%d)",
block.vtx[0]->GetValueOut(AreEnforcedValuesDeployed()), blockReward),
REJECT_INVALID, "bad-cb-amount");

I know this is not related to getting a block template but make sure your pool is properly configured to support the dev fee. (Keep in mind that the founder address is a P2SH multi-sig addr and do not subtract from coinbase.)
Yiimp example: mivanoski/yiimp@9cff829

If you are still experiencing this problem, make a new issue with additional information (if possible). I apologize for the inconvenience.

from avian.

alamshafil avatar alamshafil commented on July 22, 2024

To my understanding, getblocktemplate only performs TestBlockValidity() if the mode in the template request is set to proposal to check a block.

from avian.

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.