Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Releases (Shanghai Support, EIP-4844 (experimental), Client Improvements) #2521

Merged
merged 31 commits into from
Feb 21, 2023
Merged
Show file tree
Hide file tree
Changes from 30 commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
da5a928
Added CHANGELOG entry, version bump, updated upstream dependency vers…
holgerd77 Feb 8, 2023
b268eff
Added CHANGELOG entry, version bump, updated upstream dependency vers…
holgerd77 Feb 8, 2023
edc59a3
Rebuild documentation (@ethereumjs/util)
holgerd77 Feb 8, 2023
0266d9b
Added withdrawal module to README (@ethereumjs/util)
holgerd77 Feb 8, 2023
20fd991
Added CHANGELOG entry, version bump, updated upstream dependency vers…
holgerd77 Feb 8, 2023
1db9fe1
Added CHANGELOG entry, version bump, updated upstream dependency vers…
holgerd77 Feb 8, 2023
fa291ad
Rebuild documentation (@ethereumjs/common)
holgerd77 Feb 8, 2023
6807ed7
Added missing EIPs to README, general updates (@ethereumjs/common)
holgerd77 Feb 8, 2023
afc2e9c
Added CHANGELOG entry, version bump, updated upstream dependency vers…
holgerd77 Feb 8, 2023
42a59ab
Added CHANGELOG entry, version bump, updated upstream dependency vers…
holgerd77 Feb 8, 2023
a6edcb9
Added CHANGELOG entry, version bump, updated upstream dependency vers…
holgerd77 Feb 8, 2023
97f1641
Added CHANGELOG entry, version bump, updated upstream dependency vers…
holgerd77 Feb 13, 2023
6bee921
Tx README/CHANGELOG fixes
holgerd77 Feb 13, 2023
42f69a4
Additional fixes
holgerd77 Feb 13, 2023
e2b0e1e
Even more fixes
holgerd77 Feb 13, 2023
f2bf39a
Added CHANGELOG entry, version bump, updated upstream dependency vers…
holgerd77 Feb 13, 2023
6aa2001
Rebuild blockchain documentation
holgerd77 Feb 13, 2023
7c55672
Added CHANGELOG entry, version bump, updated upstream dependency vers…
holgerd77 Feb 13, 2023
55e2fe9
Rebuild EVM documentation
holgerd77 Feb 13, 2023
82613a3
Added CHANGELOG entry, version bump, updated upstream dependency vers…
holgerd77 Feb 13, 2023
145534c
Added CHANGELOG entry, version bump, updated upstream dependency vers…
holgerd77 Feb 13, 2023
2c632d9
Tx libray KZG setup instruction generalization
holgerd77 Feb 16, 2023
18e253d
Create and consolidate KZG setup instructions within a single source …
holgerd77 Feb 16, 2023
a547086
Added 4844 and KZG setup instructions and refernces to the Blockchain…
holgerd77 Feb 16, 2023
6712256
Fixes
holgerd77 Feb 16, 2023
77c642b
Bumped client version to v0.7.0, added CHANGELOG entry
holgerd77 Feb 16, 2023
dace7d6
Rebuild package-lock.json
holgerd77 Feb 16, 2023
c9021fb
Update packages/client/CHANGELOG.md
holgerd77 Feb 17, 2023
1e822d9
Completed CHANGELOG files
holgerd77 Feb 20, 2023
487e8c9
Update packages/util/CHANGELOG.md
gabrocheleau Feb 20, 2023
fbb013c
Update packages/client/CHANGELOG.md
gabrocheleau Feb 20, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
258 changes: 129 additions & 129 deletions package-lock.json

Large diffs are not rendered by default.

36 changes: 36 additions & 0 deletions packages/block/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,42 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
(modification: no type change headlines) and this project adheres to
[Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## 4.2.0 - 2023-01-16

### Functional Shanghai Support

This release fully supports all EIPs included in the [Shanghai](https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/shanghai.md) feature hardfork scheduled for early 2023. Note that a `timestamp` to trigger the `Shanghai` fork update is only added for the `sepolia` testnet and not yet for `goerli` or `mainnet`.

You can instantiate a Shanghai-enabled Common instance for your transactions with:

```typescript
import { Common, Chain, Hardfork } from '@ethereumjs/common'

const common = new Common({ chain: Chain.Mainnet, hardfork: Hardfork.Shanghai })
```

### EIP-4844 Shard Blob Transactions Support (experimental)

This release supports an experimental version of the blob transaction type introduced with [EIP-4844](https://eips.ethereum.org/EIPS/eip-4844) as being specified in the [01d3209](https://github.com/ethereum/EIPs/commit/01d320998d1d53d95f347b5f43feaf606f230703) EIP version from February 8, 2023 and deployed along `eip4844-devnet-4` (January 2023).

#### Initialization

To create blocks which include blob transactions you have to active EIP-4844 in the associated `@ethereumjs/common` library:
gabrocheleau marked this conversation as resolved.
Show resolved Hide resolved

```typescript
import { Common, Chain, Hardfork } from '@ethereumjs/common'

const common = new Common({ chain: Chain.Mainnet, hardfork: Hardfork.Shanghai, eips: [4844] })
```

**Note:** Working with blob transactions needs a manual KZG library installation and global initialization, see [KZG Setup](https://github.com/ethereumjs/ethereumjs-monorepo/tree/master/packages/tx/README.md#kzg-setup) for instructions.
gabrocheleau marked this conversation as resolved.
Show resolved Hide resolved

### Other Changes

- Handle hardfork defaults consistently, PR [#2467](https://github.com/ethereumjs/ethereumjs-monorepo/pull/2467)
- New `generateWithdrawalsSSZRoot()` method, PR [#2488](https://github.com/ethereumjs/ethereumjs-monorepo/pull/2488)
- Allow genesis to be post merge, PR [#2530](https://github.com/ethereumjs/ethereumjs-monorepo/pull/2530)

## 4.1.0 - 2022-12-09

### Experimental EIP-4895 Beacon Chain Withdrawals Support
Expand Down
18 changes: 18 additions & 0 deletions packages/block/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ To obtain the latest version, simply require the project using `npm`:
npm install @ethereumjs/block
```

**Note:** If you want to work with `EIP-4844` related functionality, you will have additional manual installation steps for the **KZG setup**, see related section below.

## Usage

### Introduction
Expand Down Expand Up @@ -139,6 +141,22 @@ const block = Block.fromBlockData(

Validation of the withdrawals trie can be manually triggered with the newly introduced async `Block.validateWithdrawalsTrie()` method.

### EIP-4844 Shard Blob Transaction Blocks (experimental)

This library supports an experimental version of the blob transaction type introduced with [EIP-4844](https://eips.ethereum.org/EIPS/eip-4844) as being specified in the [01d3209](https://github.com/ethereum/EIPs/commit/01d320998d1d53d95f347b5f43feaf606f230703) EIP version from February 8, 2023 and deployed along `eip4844-devnet-4` (January 2023) starting with `v4.2.0`.

#### Initialization

To create blocks which include blob transactions you have to active EIP-4844 in the associated `@ethereumjs/common` library:

```typescript
import { Common, Chain, Hardfork } from '@ethereumjs/common'

const common = new Common({ chain: Chain.Mainnet, hardfork: Hardfork.Shanghai, eips: [4844] })
```

**Note:** Working with blob transactions needs a manual KZG library installation and global initialization, see [KZG Setup](https://github.com/ethereumjs/ethereumjs-monorepo/tree/master/packages/tx/README.md#kzg-setup) for instructions.

### Consensus Types

The block library supports the creation as well as consensus format validation of PoW `ethash` and PoA `clique` blocks (so e.g. do specific `extraData` checks on Clique/PoA blocks).
Expand Down
12 changes: 6 additions & 6 deletions packages/block/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ethereumjs/block",
"version": "4.1.0",
"version": "4.2.0",
"description": "Provides Block serialization and help functions",
"keywords": [
"ethereum",
Expand Down Expand Up @@ -38,11 +38,11 @@
"tsc": "../../config/cli/ts-compile.sh"
},
"dependencies": {
"@ethereumjs/common": "^3.0.2",
"@ethereumjs/rlp": "^4.0.0",
"@ethereumjs/trie": "^5.0.2",
"@ethereumjs/tx": "^4.0.2",
"@ethereumjs/util": "^8.0.3",
"@ethereumjs/common": "^3.1.0",
"@ethereumjs/rlp": "^4.0.1",
"@ethereumjs/trie": "^5.0.3",
"@ethereumjs/tx": "^4.1.0",
"@ethereumjs/util": "^8.0.4",
"ethereum-cryptography": "^1.1.2",
"ethers": "^5.7.1"
},
Expand Down
41 changes: 41 additions & 0 deletions packages/blockchain/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,47 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
(modification: no type change headlines) and this project adheres to
[Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## 6.2.0 - 2023-02-21

### Functional Shanghai Support

This release fully supports all EIPs included in the [Shanghai](https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/shanghai.md) feature hardfork scheduled for early 2023. Note that a `timestamp` to trigger the `Shanghai` fork update is only added for the `sepolia` testnet and not yet for `goerli` or `mainnet`.

You can instantiate a Shanghai-enabled Common instance for your transactions with:

```typescript
import { Common, Chain, Hardfork } from '@ethereumjs/common'

const common = new Common({ chain: Chain.Mainnet, hardfork: Hardfork.Shanghai })
```

### Experimental EIP-4844 Shard Blob Transactions Support

This release supports an experimental version of the blob transaction type introduced with [EIP-4844](https://eips.ethereum.org/EIPS/eip-4844) as being specified in the [01d3209](https://github.com/ethereum/EIPs/commit/01d320998d1d53d95f347b5f43feaf606f230703) EIP version from February 8, 2023 and deployed along `eip4844-devnet-4` (January 2023), see PR [#2349](https://github.com/ethereumjs/ethereumjs-monorepo/pull/2349) as well as PRs [#2522](https://github.com/ethereumjs/ethereumjs-monorepo/pull/2522) and [#2526](https://github.com/ethereumjs/ethereumjs-monorepo/pull/2526).

The blockchain library now allows for blob transactions to be validated and included in a chain where EIP-4844 activated either by hardfork or standalone EIP (see latest tx library release for additional details).

### Block Interface getBlock() Signature Fix

Always a bit tricky, but we felt that we needed to do this. We had a misalignment of our blockchain implementation of the `Blockchain.getBlock()` method and the definition of the associated interface:

- Blockchain class: `async getBlock(blockId: Buffer | number | bigint): Promise<Block>`
- Blockchain interface: `getBlock(blockId: Buffer | number | bigint): Promise<Block | null>`

So the Blockchain interface was - falsely - claiming that there would be the possibility of a `null` value returned in the case of a block not being found while the actual implementation was throwing an error in such a case.

We now fixed this by removing the `null` from the interface return values - see PR [#2524](https://github.com/ethereumjs/ethereumjs-monorepo/pull/2524), after exploring the other way around as well (and the reverting), see PR [#2516](https://github.com/ethereumjs/ethereumjs-monorepo/pull/2516).

While this might lead to breaking code constallations on the TypeScript level if this `null` value is picked up we felt this is the right thing to do since this divergence would otherwise continue to "trick" people into assuming and dealing with `null` values for non-existing-block assumptions in their code and continue to produce eventual bugs (we actually fell over this ourselves).
holgerd77 marked this conversation as resolved.
Show resolved Hide resolved

A bit on the verge of breaking vs. bug fixing, sorry if you are eventually affected, but we just can't do a single breaking release update for a fix on that level.

### Other Changes

- Timestamp-related `Blockchain.createGenesisBlock()` fix, PR [#2529](https://github.com/ethereumjs/ethereumjs-monorepo/pull/2529)
- Allow genesis to be post merge, PR [#2530](https://github.com/ethereumjs/ethereumjs-monorepo/pull/2530)
- Add extra validations for assuming nil bodies in `getBlock()`, PR [#2534](https://github.com/ethereumjs/ethereumjs-monorepo/pull/2534)

## 6.1.0 - 2022-12-09

### Experimental EIP-4895 Beacon Chain Withdrawals Support
Expand Down
8 changes: 8 additions & 0 deletions packages/blockchain/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ To obtain the latest version, simply require the project using `npm`:
npm install @ethereumjs/blockchain
```

**Note:** If you want to work with `EIP-4844` related functionality, you will have additional manual installation steps for the **KZG setup**, see related section below.

## Usage

### Introduction
Expand Down Expand Up @@ -104,6 +106,12 @@ The genesis block from the initialized `Blockchain` can be retrieved via the `Bl

This library supports the handling of `EIP-1559` blocks and transactions starting with the `v5.3.0` release.

### EIP-4844 Shard Blob Transactions Support (experimental)

This library supports an experimental version of the blob transaction type introduced with [EIP-4844](https://eips.ethereum.org/EIPS/eip-4844) as being specified in the [01d3209](https://github.com/ethereum/EIPs/commit/01d320998d1d53d95f347b5f43feaf606f230703) EIP version from February 8, 2023 and deployed along `eip4844-devnet-4` (January 2023) starting with `v6.2.0`.

The blockchain library now allows for blob transactions to be validated and included in a chain where EIP-4844 activated either by hardfork or standalone EIP (see latest tx library release for additional details).

## API

### Docs
Expand Down
2 changes: 1 addition & 1 deletion packages/blockchain/docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ Parses the geth genesis state into Blockchain GenesisState

#### Defined in

[utils.ts:8](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/blockchain/src/utils.ts#L8)
[utils.ts:9](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/blockchain/src/utils.ts#L9)
Loading