Skip to content
This repository has been archived by the owner on Jun 30, 2023. It is now read-only.

Update Frontier/Ethereum/EVM to support Substrate v0.9.18 + EIP-1559 #95

Merged
merged 15 commits into from
May 12, 2022

Conversation

icodezjb
Copy link
Member

No description provided.

@icodezjb
Copy link
Member Author

icodezjb commented May 5, 2022

metamask 切换到EIP2559还需要手动设置 BaseFeePerGas

system.setStorage

key: 0xc1fef3b7207c11a52df13c12884e77263864ade243c642793ebcfe9e16f454ca
value: 0x001417c668000000000000000000000000000000000000000000000000000000

@icodezjb icodezjb force-pushed the polkadot-v0.9.18 branch from 659def1 to 5335c4f Compare May 5, 2022 12:36
@icodezjb
Copy link
Member Author

icodezjb commented May 6, 2022

This runtime introduces many changes to our Ethereum layer, specially around the EIP 1559. Here are the important parts:

EVM 0.33.1 - London support

EIP-3198: BASEFEE opcode
EIP-3529: Reduction in refunds
EIP-3541: Reject new contracts starting with the 0xEF byte

Ethereum 0.11.1

EIP-2718: Typed transactions
EIP-2930: Optional access lists
EIP-1559: Fee market change

Ethereum API - Changes

  • new rpc eth_feeHistory: Returns transaction fee data for up to 1,024 blocks.
  • new rpc eth_maxPriorityFeePerGas: Returns a fee per gas that is an estimate of how much you can pay as a priority fee, or "tip", to get a transaction included in the current block.
  • new property block.baseFeePerGas: baseFeePerGas used for the given block
  • new property transactionReceipt.effectiveGasPrice: gas price being used for the transaction
  • new property transaction.accessList: is an array of type [[{20 bytes}, [{32 bytes}...]]...], storing the contract address and the storage keys. Ex:
[
  [
    "0xde0b295669a9fd93d5f28d9ec85e40f4cb697bae",
    [
     "0x0000000000000000000000000000000000000000000000000000000000000003",
     "0x0000000000000000000000000000000000000000000000000000000000000007"
    ]
  ], [
    "0xbb9bc244d798123fde783fcc1c72d3bb8c189413",
    []
  ]
]
  • new property transaction.maxFeePerGas: how much BaseFee the transaction is allowed to pay.
  • new property transaction.maxPriorityFeePerGas: Correspond to the "tip" to the miner. (Note: It is currently included in the normal fees, being 100% to validators)
  • new property transaction.type: The current type of transaction 0 (Legacy), 1 (EIP-2930), 2 (EIP-1559)
    The base fee used in block is currently constant (450Gwei on SherpaX). The call the eth_gasPrice will return that value.

@icodezjb icodezjb merged commit 2c3d368 into singleton May 12, 2022
@icodezjb icodezjb deleted the polkadot-v0.9.18 branch May 12, 2022 02:13
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants