<p><code>MAX_PACKAGE_WEIGHT</code> is statically checked to be at least <code>MAX_STANDARD_TX_WEIGHT</code>:</p>
<pre class="lang-cpp prettyprint-override"><code>static constexpr uint32_t MAX_PACKAGE_WEIGHT = 404'000;
static_assert(MAX_PACKAGE_WEIGHT &gt;= MAX_STANDARD_TX_WEIGHT);
</code></pre>
<p>If you want to increase <code>MAX_STANDARD_TX_WEIGHT</code> beyond 404000, you'll also need to increase <code>MAX_PACKAGE_WEIGHT</code>, in your case for example to 804000.</p>
<p>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.</p>

CC BY-SA 4.0
2024-09-15T17:02:15.350Z
Thank you friend for your response! :)
TheLordPayne
CC BY-SA 4.0
2024-08-27T09:59:44.350Z
2024-08-27T09:59:44.350Z
Vojtěch Strnad
<p>just wanted to put here what I did in case anyone later intend to try the same.</p>
<p>Here is what I changed:</p>
<pre><code>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};
</code></pre>
<p>See ya!!</p>

CC BY-SA 4.0
2024-09-15T17:01:54.893Z
2024-09-15T17:01:54.893Z
TheLordPayne
<p>I am trying to create a transaction and I saw this issue here: <a href="https://github.com/bitcoin/bitcoin/issues/27490" rel="nofollow noreferrer">https://github.com/bitcoin/bitcoin/issues/27490</a></p>
<p>I downloaded Bitcoin core source and started to compile following the documentation, then I changed on this file <strong>bitcoin/src/policy/policy.h</strong> to this new value {800000} like this:</p>
<pre><code>astatic constexpr int32_t MAX_STANDARD_TX_WEIGHT{800000};
</code></pre>
<p>But When I am using make, I get this error</p>
<pre><code>  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 &gt;= MAX_STANDARD_TX_WEIGHT);
  |               ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
</code></pre>
<p>How to solve this to allow this new value? Just to clarify, I am trying to create an Inscription using Ordinals theory.</p>
<p>Thanks so much for any help!</p>

<bitcoin-core><bitcoin-core-development><compiling><non-standard-transaction><transaction-weight>
How to change Bitcoin Core to allow MAX_STANDARD_TX_WEIGHT to be greater than 400000?
TheLordPayne
# How to change Bitcoin Core to allow MAX_STANDARD_TX_WEIGHT to be greater than 400000?

(Asked by: username_0 on 2024-08-27)

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!

**Tags:** bitcoin-core, bitcoin-core-development, compiling, non-standard-transaction, transaction-weight


---

## 2 answers

### Answer by username_1 on 2024-08-27. Score: 4

`MAX_PACKAGE_WEIGHT` is statically checked to be at least `MAX_STANDARD_TX_WEIGHT`:

```cpp
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.

> **Comments:**
> **username_0**: Thank you friend for your response! :)  

---

### Answer by username_0 on 2024-09-15. Score: 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!!


---

