Coder Social home page Coder Social logo

Comments (9)

bafu avatar bafu commented on August 12, 2024 1

@Julian-dev28 Could you help double check if my steps to update subnet-evm are correct?

I followed the steps in the Node update document but cannot find the subnet-evm update document. Thanks!

from subnet-evm.

ceyonur avatar ceyonur commented on August 12, 2024 1

We suspect that if you have created your chain before you upgrade your subnet-evm, the chain genesis might have stored incorrectly (without feeConfigManager) with the old version of subnet-evm. After you updated the subnet-evm feeConfigManager gets recognized by the new version and being activated in the genesis, which changes the genesis hash. This could create a genesis not compatible error.

from subnet-evm.

yulin-dong avatar yulin-dong commented on August 12, 2024 1

@ceyonur @Julian-dev28 I want to consult you on the last question related to this issue:

If I want to mint native coins and config dynamic fees on a subnet whose genesis did not contain the precompile configs, how can I add the precompile functionalities? Many thanks!

Is https://docs.avax.network/subnets/customize-a-subnet#network-upgrades-enabledisable-precompiles what you are looking for?

from subnet-evm.

ceyonur avatar ceyonur commented on August 12, 2024

can you send the 2fQBahhq3F9eip8KobMgjbvBEahW3153kvAy6YPDrGMTceZcGG.log logs? The one provided in logs is not the problematic chain.

from subnet-evm.

Julian-dev28 avatar Julian-dev28 commented on August 12, 2024

@bafu Thanks again for bringing this up

I've replied on Discord when this issue was first posted and I hope you were able to solve it.

Due to inactivity, I will go ahead and close the issue for now 🙂

Please feel free to ping a member of the team on discord if you run into any more trouble.

Cheers

from subnet-evm.

bafu avatar bafu commented on August 12, 2024

@ceyonur @Julian-dev28 Sorry for the late reply because my testnet vaoidator has become non-bootstrapped with unknown issue. I'm figuring out the root cause and will go back to this issue soon. Thanks for following this issue up!

from subnet-evm.

bafu avatar bafu commented on August 12, 2024

After re-creating a subnet with

  1. avalanchego v1.7.14 (pre-built binary)
  2. subnet v0.2.8 (pre-built binary)

I can get/set fee configs with FeeManager correctly

> fm = await ethers.getContractAt("IFeeManager", "0x0200000000000000000000000000000000000003")

> await fm.getFeeConfig()
[
  BigNumber { value: "20000000" },
  BigNumber { value: "2" },
  BigNumber { value: "1000000000" },
  BigNumber { value: "100000000" },
  BigNumber { value: "48" },
  BigNumber { value: "0" },
  BigNumber { value: "10000000" },
  BigNumber { value: "500000" },
  gasLimit: BigNumber { value: "20000000" },
  targetBlockRate: BigNumber { value: "2" },
  minBaseFee: BigNumber { value: "1000000000" },
  targetGas: BigNumber { value: "100000000" },
  baseFeeChangeDenominator: BigNumber { value: "48" },
  minBlockGasCost: BigNumber { value: "0" },
  maxBlockGasCost: BigNumber { value: "10000000" },
  blockGasCostStep: BigNumber { value: "500000" }
]

> await fm.setFeeConfig(20000000, 2, 1000000000, 100000000, 48, 0, 10000000, 500000)
{
  hash: '0xd29ee59c9a9a0e752ff2369d09b08653d0fc4433aa8769c5982cfe5de5ce1652',
  type: 0,
  accessList: null,
  blockHash: '0x2ee0f10f1ae7733c80d761b9b760074a205a38f8fb414713d7c25826aceac138',
  blockNumber: 6,
  transactionIndex: 0,
  confirmations: 1,
  from: '0x63B7076FC0A914Af543C2e5c201df6C29FCC18c5',
  gasPrice: BigNumber { value: "1000000000" },
  gasLimit: BigNumber { value: "202292" },
  to: '0x0200000000000000000000000000000000000003',
  value: BigNumber { value: "0" },
  nonce: 6,
  data: '0x8f10b5860000000000000000000000000000000000000000000000000000000001312d00000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000773594000000000000000000000000000000000000000000000000000000000005f5e100000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000989680000000000000000000000000000000000000000000000000000000000007a120',
  r: '0x353be061d8098f894c8f84e209b653431b905636129073071a748ab64c326f8d',
  s: '0x7febdf074517e715d0b3d03c2f73688a6eec9bcf785abc5353a277c64d109967',
  v: 21051,
  creates: null,
  chainId: 10508,
  wait: [Function (anonymous)]
}

> await fm.getFeeConfig()
[
  BigNumber { value: "20000000" },
  BigNumber { value: "2" },
  BigNumber { value: "2000000000" },
  BigNumber { value: "100000000" },
  BigNumber { value: "48" },
  BigNumber { value: "0" },
  BigNumber { value: "10000000" },
  BigNumber { value: "500000" },
  gasLimit: BigNumber { value: "20000000" },
  targetBlockRate: BigNumber { value: "2" },
  minBaseFee: BigNumber { value: "2000000000" },
  targetGas: BigNumber { value: "100000000" },
  baseFeeChangeDenominator: BigNumber { value: "48" },
  minBlockGasCost: BigNumber { value: "0" },
  maxBlockGasCost: BigNumber { value: "10000000" },
  blockGasCostStep: BigNumber { value: "500000" }
]

from subnet-evm.

bafu avatar bafu commented on August 12, 2024

@ceyonur @Julian-dev28 I want to consult you on the last question related to this issue:

If I want to mint native coins and config dynamic fees on a subnet whose genesis did not contain the precompile configs, how can I add the precompile functionalities? Many thanks!

from subnet-evm.

bafu avatar bafu commented on August 12, 2024

Thanks for your sharing, Yulin.

For anyone looking for the details of config.json in the doc above:

  1. The default filepath is $HOME/.avalanchego/configs/chains/<blockchainId>/config.json.
  2. You can specify a different fileapth by the --chain-config-dir parameter of avalanchego.
  3. References
    1. Network Upgrades: Enable/Disable Precompiles
    2. Subnet Chain Configs
    3. Chain Configs
    4. AvalancheGo Config and Flags

from subnet-evm.

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.