Coder Social home page Coder Social logo

tx fee issue about digibyte HOT 2 CLOSED

digibyte-core avatar digibyte-core commented on August 10, 2024
tx fee issue

from digibyte.

Comments (2)

JaredTate avatar JaredTate commented on August 10, 2024

Thanks for bringing this issue up. We increased DEFAULT_MIN_RELAY_TX_FEE but it appears we likely need to also increase DEFAULT_BLOCK_MIN_TX_FEE & maybe DEFAULT_INCREMENTAL_RELAY_FEE & DUST_RELAY_TX_FEE.

static const unsigned int DEFAULT_MIN_RELAY_TX_FEE = 100000;

static const unsigned int DEFAULT_BLOCK_MIN_TX_FEE = 1000;

It looks like DEFAULT_BLOCK_MIN_TX_FEE is called in BlockAssembler, so its being assembled with lower fees, then getting rejected by PeerManagerImpl::MaybeSendFeefilter where DEFAULT_MIN_RELAY_TX_FEE is called.

digibyte/src/miner.cpp

Lines 56 to 59 in b75fea6

BlockAssembler::Options::Options() {
blockMinFeeRate = CFeeRate(DEFAULT_BLOCK_MIN_TX_FEE);
nBlockMaxWeight = DEFAULT_BLOCK_MAX_WEIGHT;
}

PeerManagerImpl::MaybeSendFeefilter calls DEFAULT_MIN_RELAY_TX_FEE and filters out TXs without high enough fees, that's why they sit in mempool. Block assembler not including high enough fee.

void PeerManagerImpl::MaybeSendFeefilter(CNode& pto, std::chrono::microseconds current_time)
{
AssertLockHeld(cs_main);
if (m_ignore_incoming_txs) return;
if (!pto.m_tx_relay) return;
if (pto.GetCommonVersion() < FEEFILTER_VERSION) return;
// peers with the forcerelay permission should not filter txs to us
if (pto.HasPermission(NetPermissionFlags::ForceRelay)) return;
CAmount currentFilter = m_mempool.GetMinFee(gArgs.GetArg("-maxmempool", DEFAULT_MAX_MEMPOOL_SIZE) * 1000000).GetFeePerK();
static FeeFilterRounder g_filter_rounder{CFeeRate{DEFAULT_MIN_RELAY_TX_FEE}};

We should probably update these below too:

static const unsigned int DEFAULT_INCREMENTAL_RELAY_FEE = 1000;

static const unsigned int DUST_RELAY_TX_FEE = 3000;

from digibyte.

ycagel avatar ycagel commented on August 10, 2024

This issue is resolved as #151 and #157 have been merged.

from digibyte.

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.