Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Commit

Permalink
feat: london (#1135)
Browse files Browse the repository at this point in the history
* add eip1559 raw and rpc types

* add eip 1559 tx type

* add standardized gas price across tx types

* add london hardfork

* add eip1559 to vm tx type

* add base fee per gas to block

* use standardized gas price func

* normalize type2 txs to legacy pre-berlin

* dont allow nullable nonce

* refine baseFeePerGas formula

* normalize txs to type 1559 when appropriate

* eip1559 tests

* export eip1559 txs with @ganache/ethereum-tx

* remove unused receipt params

* add tests for calculating baseFeePerGas

* fix bug with block.toJSON

* add effectiveGasPrice and methods to update

* order/reorder tx pool based off of effectiveGasPrice

* add capacity enum to miner

* remove unnecessary data

* remove instamine from miner. have calcNextBaseFee to return buff

* add back gasPrice to receipt

* test for miner and txPool ordering post london

* add miner design decisions

* initialize baseFeePerGas as an estimate on eip1559 tx

* fix test that broke due to typed tx hash fix.

* remove todo

* add `london` to `TRANSACTION_DATA_NON_ZERO_GAS`

* remove to-do and unnecessary conversion of datatype

* improving "it" statements in tests

* clarify comments in test

* remove .only from test 😬

* add JSDOC for Heap.prototype.refresh and refresher

* set higher gas price for in revert test so CI will run

* make tests pass

* Fix genesis block parent hash

and add a DATA_ZERO constant while we're at it

* tx 1 and 2 tests shouldn't include 27 in their v values

* make transaction logging easier to read

* fix racey test

* fix test comment typo

* ignore logging output on chatty block test

* update docs

* remove unused import

* undo some unnecessary changes

* add JSDOC to miner's new Capacity enum

* use blockchain var

* use `Capacity` enum for call to `mine`

* remove unused imports

* fix comment typo

* remove infinite test timeout

* remove unused dep

* fix type

* don't skip all the tests 🤦

* remove testing promise thing

* revert back to ignoring

* update docs

* Remove unused import

* remove test

* update docs

* fix comment typo

* move miner's `refresher` off fthe miner class

* try to fix github actions auth issue

* short circuit in Wuantity.toBuffer

* use bigint when doing gas math stuff

* fix tx type 1 signing error

* always validate signature recovery ID

* update docs

* rename repo-token to token in github actions

* fix typo in github action config

* fix typos

* fix typos

* don't allow unlimited time in test

* use static eth_gasPrice for gas price in test

* undo whitespace change

* Add error for transaction decode failure.

It doesn't just throw with an "invalid remainder" message now :-)

* Update src/packages/utils/src/utils/heap.ts

* rename lastMaxBlockBaseFee to maxPossibleBaseFee

* rename calcMaxNBlocksBaseFee to calcNBlocksMaxBaseFee

* move type def from runtime-block to block

* update error message in test failure

* update docs

Co-authored-by: MicaiahReid <[email protected]>
  • Loading branch information
davidmurdoch and MicaiahReid authored Sep 17, 2021
1 parent 5c2e5a0 commit ded8b37
Show file tree
Hide file tree
Showing 71 changed files with 13,228 additions and 2,848 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ jobs:
with:
access_token: ${{ github.token }}
- uses: actions/checkout@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}

- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v1
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ jobs:

steps:
- uses: actions/checkout@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v1
with:
Expand Down Expand Up @@ -48,7 +50,8 @@ jobs:

steps:
- uses: actions/checkout@v2

with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v1
with:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ jobs:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/setup-node@v1
with:
node-version: 14
Expand Down
2 changes: 1 addition & 1 deletion docs/assets/js/ganache/ganache.min.js

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions docs/assets/js/ganache/ganache.min.js.LICENSE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,13 @@
* @license MIT
*/

/*!
* @ganache/secp256k1
*
* @author David Murdoch
* @license MIT
*/

/*!
* The buffer module from node.js, for the browser.
*
Expand Down
2 changes: 1 addition & 1 deletion docs/assets/js/ganache/ganache.min.js.map

Large diffs are not rendered by default.

218 changes: 109 additions & 109 deletions docs/index.html

Large diffs are not rendered by default.

Loading

0 comments on commit ded8b37

Please sign in to comment.