Git Product home page Git Product logo

Comments (8)

the-frey avatar the-frey commented on August 28, 2024 2

I'll pick this up and look into it.

from juno.

the-frey avatar the-frey commented on August 28, 2024 1

This worked and mitigated the attack vector on testnet, so we need to implement on mainnet.

from juno.

JakeHartnell avatar JakeHartnell commented on August 28, 2024 1

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.

from juno.

giansalex avatar giansalex commented on August 28, 2024 1

The gas used in attack was 2'163'370'243, I think the max_gas can be increased , to allow more txs

from juno.

the-frey avatar the-frey commented on August 28, 2024

Okay, so I don't think we should hard code something programmatically. I think we can use governance and propose a sensible number. .ConsensusParams.Block.MaxGas is the param we're after.

junod query params subspace baseapp BlockParams --chain-id uni

Reveals that it is currently set to:

value: '{"max_bytes":"22020096","max_gas":"-1"}'

from juno.

the-frey avatar the-frey commented on August 28, 2024

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"
}

from juno.

nullmames avatar nullmames commented on August 28, 2024

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.

{
  "title": "Governance Proposal to add maximum per block gas to increase tx",
  "description": "To be able to simulate network load in the 300tx range in addition to SC load",
  "changes": [{
    "subspace": "baseapp",
    "key": "BlockParams",
    "value": {
      "max_gas": "80000000"
    }
  }],
  "deposit": "100000000ujunox"
}

from juno.

the-frey avatar the-frey commented on August 28, 2024

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"
}

from juno.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.