1

I am trying to create a transaction and I saw this issue here: https://github.com/bitcoin/bitcoin/issues/27490

I downloaded Bitcoin core source and started to compile following the documentation, then I changed on this file bitcoin/src/policy/policy.h to this new value {800000} like this:

astatic constexpr int32_t MAX_STANDARD_TX_WEIGHT{800000};

But When I am using make, I get this error

  CXX      libbitcoin_node_a-blockencodings.o
  In file included from ./txmempool.h:18,
             from blockencodings.cpp:15:
 ./policy/packages.h:25:34: error: static assertion failed
  25 | static_assert(MAX_PACKAGE_WEIGHT >= MAX_STANDARD_TX_WEIGHT);
  |               ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~

How to solve this to allow this new value? Just to clarify, I am trying to create an Inscription using Ordinals theory.

Thanks so much for any help!

0

2 Answers 2

4

MAX_PACKAGE_WEIGHT is statically checked to be at least MAX_STANDARD_TX_WEIGHT:

static constexpr uint32_t MAX_PACKAGE_WEIGHT = 404'000;
static_assert(MAX_PACKAGE_WEIGHT >= MAX_STANDARD_TX_WEIGHT);

If you want to increase MAX_STANDARD_TX_WEIGHT beyond 404000, you'll also need to increase MAX_PACKAGE_WEIGHT, in your case for example to 804000.

Note that changing your own node's standardness rules is usually not enough to relay your non-standard transaction to a miner willing to include it in a block.

1
  • Thank you friend for your response! :) Commented Sep 15 at 17:02
0

just wanted to put here what I did in case anyone later intend to try the same.

Here is what I changed:

Files: src/policy/packages.h
       src/policy/policy.h
       

file /src/policy/packages.h
...static constexpr uint32_t MAX_PACKAGE_WEIGHT = 808'000;

file /src/policy/policy.h
...static constexpr int32_t MAX_STANDARD_TX_WEIGHT{800000};
...static constexpr unsigned int DEFAULT_ANCESTOR_SIZE_LIMIT_KVB{201}; /** default is 101 */
...static constexpr unsigned int DEFAULT_DESCENDANT_SIZE_LIMIT_KVB{201};

See ya!!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.