-
Notifications
You must be signed in to change notification settings - Fork 174
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
Set max gas limit on Mainnet #82
Comments
I'll pick this up and look into it. |
Okay, so I don't think we should hard code something programmatically. I think we can use governance and propose a sensible number.
Reveals that it is currently set to:
|
Going to try this on testnet: {
"title": "Governance Proposal to add maximum per block gas",
"description": "To mitigate potential attacks against the network, we need to set a max per block gas ceiling.",
"changes": [{
"subspace": "baseapp",
"key": "BlockParams",
"value": {
"max_bytes": "22020096",
"max_gas": "40000000"
}
}],
"deposit": "100000000ujunox"
} |
This worked and mitigated the attack vector on testnet, so we need to implement on mainnet. |
Awesome, will leave this open as a reminder until it passes. We should do some more testing to make sure we set it high enough to run contracts like JunoSwap and DAO DAO. |
The gas used in attack was |
We have maxed out tx on testnet with just a few tx spammers. So we can simulate load on the network during SC testing, going to double max gas per block.
|
Note for future: mainnet prop for this was initially 100,000,000 {
"title": "Governance Proposal to set maximum per block gas",
"description": "To stop attacks against the network via the use of malicious smart contracts, we need to set a max per block gas limit. From tes
ting on the Uni testnet, the core team feel this value is a good starting point, and it can be increased in future if necessary. This proposal mar
ks the first step required to release Moneta. If you would like to discuss further, please use the governance channel on the Juno Discord.",
"changes": [{
"subspace": "baseapp",
"key": "BlockParams",
"value": {"max_gas":"100000000"}
}],
"deposit": "100000000ujuno"
} |
We should implement a gas limit like Terra. Kudos to @the-frey for this suggestion.
A gas limit will set an absolute maximum amount of gas a contract can use.
The text was updated successfully, but these errors were encountered: