[Bug] `eth_createAccessList` method is not supported whenever sending a transaction
Describe the bug Sending a transaction with an access list in MetaMask does not cause any effect. Transaction is broadcasted without the access list.
Some context Broadcasting a transaction with an access list can significantly lower the gas (this applies to contract interactions). The reason is that accessing addresses or storage keys for the first time is way more expensive than accessing it a second, third or x's time. This was changed on the Berlin upgrade, where gas was increased due a DDOS attack. The access list is a way to "mitigate" a bit, the increase on gas.
With the access list you can declare beforehand which addresses and slots (for storage keys) can be considered accessed, reducing then the gas for that transaction.
Note: there is the same issue in Extension here.
Screenshots
See the table comparing the gas costs and how gas is decreased whenever the address/key is accessed already.
Src: https://hackmd.io/@fvictorio/gas-costs-after-berlin
To Reproduce Use the following HTML:
<html>
<body>
<script type="text/javascript" src="ethers.umd.js"></script>
<script type="text/javascript">
(async function() {
const signer = await new ethers.providers.Web3Provider(
window.ethereum
).getSigner()
let tx = await signer.sendTransaction({
to: signer.getAddress(),
data: "0x1234",
type: 2,
accessList: [
{
address: "0x8ba1f109551bD432803012645Ac136ddd64DBA72",
storageKeys: [ "0x0000000000000000000000000000000000000000000000000000000000001234" ]
}
]
});
})();
</script>
</body>
</html>
Expected behavior Access list should be sent
Smartphone (please complete the following information):
- Device: any
- OS: Android / iOS
- App Version: all versions affected (prod)
to be added after bug submission by internal support / PM Severity
- How critical is the impact of this bug on a user?
- Add stats if available on % of customers impacted
- Is this visible to all users?
- Is this tech debt?
There are currently 76,281 probably increasingly insecure CryptoKitties here wondering why they have been on siring auctions for so long. They must be horny af.
Please fix!
This bug plagues the life of tens of thousands users since Berlin update. Can devs do something already?
This issue has been automatically marked as stale because it has not had recent activity in the last 90 days. It will be closed in 7 days. Thank you for your contributions.