New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added max_weight
parameter for mining
#9234
base: master
Are you sure you want to change the base?
Conversation
I did a quick test, it works as expected:
|
side note: I'll add it to the openrpc document |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bump CORE_RPC_VERSION_MINOR
and WALLET_RPC_VERSION_MINOR
.
`max_weight` allows miners to limit the weight of the blocks they mine. Default is 0 (unlimited). Added to `get_block_template` RPC, `start_mining` RPC and `start_mining` console command.
@selsta RPC versions bumped |
Are we sure that the default should be no limit? It's not clear that relying on miners to set it themselves will result in any effective limit on block sizes. Unless that's not the goal in the first place, and rather only to give miners the option to, if they choose. |
@expiredhotdog There is still a limit enforced by the median block size. |
@SChernykh Right, but I mean in the context of this PR. |
In the context of this PR, default behavior (0, no limit) is the same as without this PR. Right now there is no limit. |
im not sure why this is needed if you can set the max txpool weight. This seems to just enabke malicious or poorly equiped miners to mess with averages. txpool shouldnt be allowed to be set smaller than 2x the median, and it should purge/replace tx via fees. And miners shouldnt be allowed to produce blocks smaller than the calculated size of the block based on effect of the highest paying tx's in the txpool on the median block size. (if the next block would increase by a max of 2% [102%], nobody should be intentionally producing blocks are 98%..) |
If you set max txpool weight, your node will remove transactions from txpool and will have to re-download them when a new block (containing them) arrives. This will put additional load on the network.
Impossible to implement as txpool contents are not a part of consensus, and it can't be coherent between different nodes. |
as does mining less tx than are being paid to be mined. Constantly full tx pools arent effienient at all. meanwhile, btc increases txpool and keeos a small blocksize, trying to force tx to be purged in a market that relies on bidding on limited blockspace.
agreed. This just makes it possible for me/blockstream to coordinate with top pools to control the blocksize of monero? let me ask this a different way: and cons =
I dont see how this pr makes any sense |
This |
The incentive didnt work for mordinals or bitcoin. why pay for storage, if you can get same the money without storing any extra tx? |
You do realise that big pools who have devs on payroll, and even individual solo miners can recompile their nodes and introduce any restrictions they want? Even without this PR. P.S. Maybe some already did... |
I do |
It's already very easy with the command line parameters to limit the txpool. But these parameters hurt more than the specific limiter for the mining only. |
Yeah. I dont like that one can limit the txpool to unreasonably low sizes either. But if there are 600mb of pending tx,maybe miners need to stop mining intentionally small blocks, yeah? |
max_weight
allows miners to limit the weight of the blocks they mine. Default is 0 (unlimited).Added to
get_block_template
RPC,start_mining
RPC andstart_mining
console command.Disclaimer: this hasn't been tested yet, and I might have missed some places in the code that need changing.