diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6c56fe1746..ffb3aa9c42 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -130,13 +130,14 @@ jobs: # Move all artifacts to current directory if [ -d "./artifacts" ]; then find ./artifacts -name "*.tar.gz" -exec mv {} . \; + find ./artifacts -name "*.tar.gz.asc" -exec mv {} . \; else echo "Warning: No artifacts directory found" fi # List available files for debugging echo "Available files:" - ls -la *.tar.gz || echo "No tar.gz files found" + ls -la *.tar.gz *.tar.gz.asc 2>/dev/null || echo "No archive files found" # Get actual archive names GETH_AMD64=$(ls bera-geth-linux-amd64-*.tar.gz 2>/dev/null | grep -v alltools | head -1) @@ -237,7 +238,7 @@ jobs: # Create assets array for gh release assets=() - for asset in bera-geth-*.tar.gz; do + for asset in bera-geth-*.tar.gz bera-geth-*.tar.gz.asc; do if [ -f "$asset" ]; then assets+=("$asset") fi diff --git a/core/block_validator.go b/core/block_validator.go index 1f528619da..8464c1f8bb 100644 --- a/core/block_validator.go +++ b/core/block_validator.go @@ -91,6 +91,11 @@ func (v *BlockValidator) ValidateBody(block *types.Block) error { isPrague1 := v.config.IsPrague1(block.Number(), block.Time()) var expectedPoLHash common.Hash if isPrague1 { + if block.ProposerPubkey() == nil { + // TODO: does this need to enforce the proposer pubkey is the exact value we expect? + return errors.New("post-prague1 block missing parent proposer pubkey") + } + polTx, err := types.NewPoLTx( v.config.ChainID, v.config.Berachain.Prague1.PoLDistributorAddress, diff --git a/core/types/transaction_marshalling.go b/core/types/transaction_marshalling.go index e4363e0d5e..7af302f565 100644 --- a/core/types/transaction_marshalling.go +++ b/core/types/transaction_marshalling.go @@ -154,6 +154,7 @@ func (tx *Transaction) MarshalJSON() ([]byte, error) { enc.Commitments = itx.Sidecar.Commitments enc.Proofs = itx.Sidecar.Proofs } + case *SetCodeTx: enc.ChainID = (*hexutil.Big)(itx.ChainID.ToBig()) enc.Nonce = (*hexutil.Uint64)(&itx.Nonce) @@ -170,6 +171,22 @@ func (tx *Transaction) MarshalJSON() ([]byte, error) { enc.S = (*hexutil.Big)(itx.S.ToBig()) yparity := itx.V.Uint64() enc.YParity = (*hexutil.Uint64)(&yparity) + + case *PoLTx: + enc.ChainID = (*hexutil.Big)(itx.ChainID) + enc.To = tx.To() + enc.Nonce = (*hexutil.Uint64)(&itx.Nonce) + enc.Gas = (*hexutil.Uint64)(&itx.GasLimit) + enc.MaxFeePerGas = (*hexutil.Big)(itx.GasPrice) + enc.MaxPriorityFeePerGas = (*hexutil.Big)(itx.GasPrice) + enc.GasPrice = (*hexutil.Big)(itx.GasPrice) + enc.Input = (*hexutil.Bytes)(&itx.Data) + v, r, s := itx.rawSignatureValues() + enc.V = (*hexutil.Big)(v) + enc.R = (*hexutil.Big)(r) + enc.S = (*hexutil.Big)(s) + yparity := v.Uint64() + enc.YParity = (*hexutil.Uint64)(&yparity) } return json.Marshal(&enc) } @@ -513,7 +530,12 @@ func (tx *Transaction) UnmarshalJSON(input []byte) error { if dec.ChainID == nil { return errors.New("missing required field 'chainId' in transaction") } - itx.ChainID = (*big.Int)(dec.ChainID) + var overflow bool + chainID, overflow := uint256.FromBig(dec.ChainID.ToInt()) + if overflow { + return errors.New("'chainId' value overflows uint256") + } + itx.ChainID = chainID.ToBig() if dec.To == nil { return errors.New("missing required field 'to' in transaction") } diff --git a/eth/catalyst/api.go b/eth/catalyst/api.go index 4b4cc0282b..8077362ef7 100644 --- a/eth/catalyst/api.go +++ b/eth/catalyst/api.go @@ -777,6 +777,7 @@ func (api *ConsensusAPI) newPayload(params engine.ExecutableData, versionedHashe "len(params.Withdrawals)", len(params.Withdrawals), "beaconRoot", beaconRoot, "len(requests)", len(requests), + "proposerPubkey", proposerPubkey, "error", err) return api.invalid(err, nil), nil } diff --git a/miner/worker.go b/miner/worker.go index a464cd30aa..105254735f 100644 --- a/miner/worker.go +++ b/miner/worker.go @@ -358,11 +358,7 @@ func (miner *Miner) commitTransactions(env *environment, plainTxs, blobTxs *tran var ( isOsaka = miner.chainConfig.IsOsaka(env.header.Number, env.header.Time) isCancun = miner.chainConfig.IsCancun(env.header.Number, env.header.Time) - gasLimit = env.header.GasLimit ) - if env.gasPool == nil { - env.gasPool = new(core.GasPool).AddGas(gasLimit) - } for { // Check interruption signal and abort building if it's fired. if interrupt != nil { @@ -497,6 +493,11 @@ func (miner *Miner) fillTransactions(interrupt *atomic.Int32, env *environment) miner.confMu.RUnlock() // Berachain: Post-Prague1, add PoL tx to the block according to BRIP-0004. + if env.gasPool == nil { + // NOTE: this check is moved here from the commitTransactions loop because we are + // "committing" a transaction outside of the loop. + env.gasPool = new(core.GasPool).AddGas(env.header.GasLimit) + } if miner.chainConfig.IsPrague1(env.header.Number, env.header.Time) { tx, err := types.NewPoLTx( miner.chainConfig.ChainID,