[monero-project/monero] Bp multi aggregation pippenger (#4219)

moneromooo-monero commented on this pull request.

>
— // divide in two steps, since the divisor must be 32 bits, but DYNAMIC_FEE_PER_KB_BASE_BLOCK_REWARD isn’t
— div128_32(hi, lo, DYNAMIC_FEE_PER_KB_BASE_BLOCK_REWARD / 1000000, &hi, &lo);
+ uint64_t unscaled_fee_base = (fee_base * min_block_weight / median_block_weight);
+ lo = mul128(unscaled_fee_base, block_reward, &hi);
+ static_assert(DYNAMIC_FEE_BASE_BLOCK_REWARD % 1000000 == 0, «DYNAMIC_FEE_BASE_BLOCK_REWARD must be divisible by 1000000»);
+ static_assert(DYNAMIC_FEE_BASE_BLOCK_REWARD / 1000000 <= std::numeric_limits::max(), «DYNAMIC_FEE_BASE_BLOCK_REWARD is too large»);
+
+ // divide in two steps, since the divisor must be 32 bits, but DYNAMIC_FEE_BASE_BLOCK_REWARD isn’t
+ div128_32(hi, lo, DYNAMIC_FEE_BASE_BLOCK_REWARD / 1000000, &hi, &lo);

They’re not per kB from v8.