Skip to content

Commit

Permalink
Added CHANGELOG entry, version bump, updated upstream dependency vers…
Browse files Browse the repository at this point in the history
…ions (@ethereumjs/block v4.2.0)
  • Loading branch information
holgerd77 committed Feb 13, 2023
1 parent 4b6179c commit 5985338
Show file tree
Hide file tree
Showing 10 changed files with 90 additions and 7 deletions.
45 changes: 45 additions & 0 deletions packages/block/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,51 @@ 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 block tx including blocks 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] })
```

The underlying `@ethereumjs/tx` library needs to have a working `kzg` library installation in the global namespace adhering to the [Kzg](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/depInterfaces.ts) interface defined in the `@ethereumjs/tx` library.

The EthereumJS libraries have been tested with the [c-kzg](https://github.com/ethereum/c-kzg-4844) library which can be installed with `npm install c-kzg`.

This library then needs to be imported along the other library imports:

```typescript
import { Common, Hardfork } from '@ethereumjs/common'
import * as kzg from 'c-kzg'
import { VM } from '@ethereumjs/vm'
```

### 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)

## 4.1.0 - 2022-12-09

### Experimental EIP-4895 Beacon Chain Withdrawals Support
Expand Down
26 changes: 26 additions & 0 deletions packages/block/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,32 @@ 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 block tx including blocks 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] })
```

The underlying `@ethereumjs/tx` library needs to have a working `kzg` library installation in the global namespace adhering to the [Kzg](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/depInterfaces.ts) interface defined in the `@ethereumjs/tx` library.

The EthereumJS libraries have been tested with the [c-kzg](https://github.com/ethereum/c-kzg-4844) library which can be installed with `npm install c-kzg`.

This library then needs to be imported along the other library imports:

```typescript
import { Common, Hardfork } from '@ethereumjs/common'
import * as kzg from 'c-kzg'
import { VM } from '@ethereumjs/vm'
```

### 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
2 changes: 1 addition & 1 deletion 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
2 changes: 1 addition & 1 deletion packages/blockchain/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"tsc": "../../config/cli/ts-compile.sh"
},
"dependencies": {
"@ethereumjs/block": "^4.1.0",
"@ethereumjs/block": "^4.2.0",
"@ethereumjs/common": "^3.1.0",
"@ethereumjs/ethash": "^2.0.3",
"@ethereumjs/rlp": "^4.0.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
},
"dependencies": {
"@chainsafe/libp2p-noise": "^4.1.1",
"@ethereumjs/block": "4.1.0",
"@ethereumjs/block": "4.2.0",
"@ethereumjs/blockchain": "6.2.0",
"@ethereumjs/common": "3.1.0",
"@ethereumjs/devp2p": "5.1.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/devp2p/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
"snappyjs": "^0.6.1"
},
"devDependencies": {
"@ethereumjs/block": "^4.1.0",
"@ethereumjs/block": "^4.2.0",
"@ethereumjs/tx": "^4.1.0",
"@types/chalk": "^2.2.0",
"@types/debug": "^4.1.4",
Expand Down
2 changes: 1 addition & 1 deletion packages/ethash/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"tsc": "../../config/cli/ts-compile.sh"
},
"dependencies": {
"@ethereumjs/block": "^4.1.0",
"@ethereumjs/block": "^4.2.0",
"@ethereumjs/rlp": "^4.0.1",
"@ethereumjs/util": "^8.0.4",
"abstract-level": "^1.0.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/statemanager/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"js-sdsl": "^4.1.4"
},
"devDependencies": {
"@ethereumjs/block": "^4.1.0",
"@ethereumjs/block": "^4.2.0",
"@ethereumjs/trie": "^5.0.3",
"@ethereumjs/util": "^8.0.4",
"@types/node": "^16.11.7",
Expand Down
12 changes: 12 additions & 0 deletions packages/vm/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,18 @@ import { Common, Chain, Hardfork } from '@ethereumjs/common'
const common = new Common({ chain: Chain.Mainnet, hardfork: Hardfork.Shanghai, eips: [4844] })
```

EIP-4844 comes with a new opcode `DATAHASH` and adds a new point evaluation precompile at address `0x14` in the underlying `@ethereumjs/evm` package. This precompile needs to have a working `kzg` library installation in the global namespace adhering to the [Kzg](https://github.com/ethereumjs/ethereumjs-monorepo/blob/master/packages/tx/src/depInterfaces.ts) interface defined in the `@ethereumjs/tx` library.

The EthereumJS libraries have been tested with the [c-kzg](https://github.com/ethereum/c-kzg-4844) library which can be installed with `npm install c-kzg`.

This library then needs to be imported along the other library imports:

```typescript
import { Common, Hardfork } from '@ethereumjs/common'
import * as kzg from 'c-kzg'
import { VM } from '@ethereumjs/vm'
```

#### Shard Blob Transactions and Block Building

The VM is now capable of running blob-including txs and blocks with `VM.runTx()` and `VM.runBlock()` taking the new gas costs for blob transactions into account. The underlying EVM `v1.3.0` now supports the new `DATAHASH` opcode and the new point evaluation precompile.
Expand Down
2 changes: 1 addition & 1 deletion packages/vm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"tsc": "../../config/cli/ts-compile.sh"
},
"dependencies": {
"@ethereumjs/block": "^4.1.0",
"@ethereumjs/block": "^4.2.0",
"@ethereumjs/blockchain": "^6.2.0",
"@ethereumjs/common": "^3.1.0",
"@ethereumjs/evm": "^1.3.0",
Expand Down

0 comments on commit 5985338

Please sign in to comment.