- 11 Nov, 2021 40 commits
-
-
elenadimitrova authored
-
elenadimitrova authored
as these serve as integration points for projects
-
elenadimitrova authored
-
elenadimitrova authored
-
elenadimitrova authored
as activated by default in 0.8
-
elenadimitrova authored
-
Annie Ke authored
-
Annie Ke authored
Breaking change in v0.8.0
-
Annie Ke authored
-
Annie Ke authored
-
Annie Ke authored
-
Mark Tyneway authored
Have the ethers L2 context helper pass through the new optimistic ethereum related fields
-
Mark Tyneway authored
-
Mark Tyneway authored
The response of the RPC endpoint `eth_getTransactionReceipt` will now return 4 new fields. - `l1GasPrice` - `l1GasUsed` - `l1Fee` - `l1FeeScalar` These fields are added to the database as part of the receipt itself. This means that it is a consensus change as the serialization of the receipt has been updated. This impacts the blockhash because the block header commits to a merkle root of all of the receipts in the block. Each of the new fields on the receipt exist in the state but would require an archive node to query for as the values can change over time.
-
Kelvin Fichter authored
-
Mark Tyneway authored
Manually handle locking and unlocking to prevent race conditions if the fee logic. The case that needs to be handled is as follows: a `gas-oracle` transaction updates the gas price after an queue origin sequencer tx is sent via RPC and already goes through the fee check. This would cause the transaction to be accepted and then fail during the state transition. This is bad because we do not have logic to hold on to the failed transaction to execute later, which is what the user would expect when sending transactions to L1. All transactions that are sent to the miner *must* be valid transactions.
-
Mark Tyneway authored
Reduce the number of requests sent by the message-relayer in the docker setup to make the logs better
-
Mark Tyneway authored
Update build command for the integration tests to simply use `yarn build` so that it is the same as the rest of the packages.
-
Mark Tyneway authored
Add test coverage for new fee scheme and refactor old tests to work with new scheme
-
Mark Tyneway authored
Add a helper function for computing the L1 cost. It looks byte by byte and sums how much the calldata would cost given the calldata costs for 0 or non 0 bytes.
-
Mark Tyneway authored
Previously, the L1 gas price was being fetched from a remote node and being held in memory. Now the L1 gas price is in a smart contract and the `SyncService` will periodically update the L1 gas price in an in memory cache to ensure that users that are sending transactions are paying enough. This also reads the overhead from the `OVM_GasPriceOracle` and rejects transactions with too low of a fee. The `tx.gasPrice` can now be variable, it no longer will reject transactions if the gas price isn't exactly the hardcoded number. The cache is now updated when the sender of a transaction included in the chain is from the current gas price oracle owner address. This depends on the cache being initialized at startup.
-
Mark Tyneway authored
The `gas-oracle` will now periodically ping L1 asking for the latest header and will update the `l1BaseFee` value in the `OVM_GasPriceOracle` oracle predeploy when the base fee changes more than a configurable amount. This is very similar to the way that the `gas-oracle` sets the L2 gas price based on the amount of gas that has been used in an amount of time. Note that this is a breaking change when it comes to config. Some config options are renamed and some config options are added. `--ethereum-http-url` now corresponds to the L1 URL and `--layer-two-http-url` corresponds to the L2 URL. Previously, only an L2 URL was provided and it was called `--ethereum-http-url`. Now there are flags for `--l1-chain-id` and `--l2-chain-id` when previously `--chain-id` corresponded to the L2 chain id. There are also now flags for turning on and off functionality. `--enable-l1-base-fee` and `--enable-l2-gas-price` are used to turn on updating of the corresponding values. They are on by default. The `--l1-base-fee-significant-factor` is expected to be a decimal and determines how much the base fee on L1 must change before the `gas-oracle` will consider updating the base fee by sending a transaction to the `OVM_GasPriceOracle`.
-
Mark Tyneway authored
Add a setter for L1 base fee. The trusted oracle can update it over time. Eventually this will become trustless, but this is a quick and easy approach for now. Also add a setter/getter for the per batch overhead and the scalar. Also emit events for when the values are updated. This will make it much easier to track historical gas prices over time. Add tests for new functionality. L2 geth will consume the new value in the `OVM_GasPriceOracle` Add getters that make it easy for users to know the L1 costs. - `getL1Fee` returns the L1 fee given the current L1 base fee known by the L2 node - `getL1GasUsed` counts the bytes and creates a sum for the gas cost of submitting the data to L1
-
elenadimitrova authored
-
elenadimitrova authored
-
elenadimitrova authored
-
elenadimitrova authored
-
elenadimitrova authored
-
elenadimitrova authored
-
elenadimitrova authored
-
elenadimitrova authored
-
elenadimitrova authored
-
elenadimitrova authored
-
elenadimitrova authored
-
elenadimitrova authored
-
elenadimitrova authored
-
elenadimitrova authored
-
elenadimitrova authored
-
elenadimitrova authored
-