Bump nim-eth for revert GasInt back to int64 (#6347)
* Bump nim-eth for revert GasInt back to int64 * Fix libnimbus_lc
This commit is contained in:
parent
20af24efdb
commit
fb0494e739
|
@ -9,6 +9,7 @@
|
|||
|
||||
import
|
||||
std/[json, sequtils, times],
|
||||
stew/saturation_arith,
|
||||
eth/common/[eth_types_rlp, transaction],
|
||||
eth/keys,
|
||||
eth/p2p/discoveryv5/random2,
|
||||
|
@ -1257,8 +1258,8 @@ proc ETHExecutionBlockHeaderCreateFromJson(
|
|||
logsBloom: distinctBase(data.logsBloom),
|
||||
difficulty: data.difficulty,
|
||||
number: distinctBase(data.number),
|
||||
gasLimit: distinctBase(data.gasLimit),
|
||||
gasUsed: distinctBase(data.gasUsed),
|
||||
gasLimit: GasInt.saturate distinctBase(data.gasLimit),
|
||||
gasUsed: GasInt.saturate distinctBase(data.gasUsed),
|
||||
timestamp: EthTime(distinctBase(data.timestamp)),
|
||||
extraData: distinctBase(data.extraData),
|
||||
mixHash: data.mixHash.asEth2Digest,
|
||||
|
@ -1613,9 +1614,9 @@ proc ETHTransactionsCreateFromJson(
|
|||
chainId: distinctBase(tx.chainId).u256,
|
||||
`from`: ExecutionAddress(data: fromAddress),
|
||||
nonce: tx.nonce,
|
||||
maxPriorityFeePerGas: tx.maxPriorityFeePerGas,
|
||||
maxFeePerGas: tx.maxFeePerGas,
|
||||
gas: tx.gasLimit,
|
||||
maxPriorityFeePerGas: tx.maxPriorityFeePerGas.uint64,
|
||||
maxFeePerGas: tx.maxFeePerGas.uint64,
|
||||
gas: tx.gasLimit.uint64,
|
||||
destinationType: destinationType,
|
||||
to: ExecutionAddress(data: toAddress),
|
||||
value: tx.value,
|
||||
|
|
|
@ -513,9 +513,9 @@ proc blockToBlockHeader*(blck: ForkyBeaconBlock): ExecutionBlockHeader =
|
|||
logsBloom : payload.logs_bloom.data,
|
||||
difficulty : default(DifficultyInt),
|
||||
number : payload.block_number,
|
||||
gasLimit : cast[GasInt](payload.gas_limit),
|
||||
gasUsed : cast[GasInt](payload.gas_used),
|
||||
timestamp : EthTime(int64.saturate payload.timestamp),
|
||||
gasLimit : GasInt.saturate(payload.gas_limit),
|
||||
gasUsed : GasInt.saturate(payload.gas_used),
|
||||
timestamp : EthTime(payload.timestamp),
|
||||
extraData : payload.extra_data.asSeq,
|
||||
mixHash : payload.prev_randao, # EIP-4399 `mixHash` -> `prevRandao`
|
||||
nonce : default(BlockNonce),
|
||||
|
|
|
@ -118,6 +118,8 @@ proc build_empty_merge_execution_payload(state: bellatrix.BeaconState):
|
|||
bellatrix.ExecutionPayloadForSigning(executionPayload: payload,
|
||||
blockValue: Wei.zero)
|
||||
|
||||
from stew/saturating_arith import saturate
|
||||
|
||||
proc build_empty_execution_payload(
|
||||
state: bellatrix.BeaconState,
|
||||
feeRecipient: Eth1Address): bellatrix.ExecutionPayloadForSigning =
|
||||
|
@ -127,8 +129,8 @@ proc build_empty_execution_payload(
|
|||
latest = state.latest_execution_payload_header
|
||||
timestamp = compute_timestamp_at_slot(state, state.slot)
|
||||
randao_mix = get_randao_mix(state, get_current_epoch(state))
|
||||
base_fee = calcEip1599BaseFee(latest.gas_limit,
|
||||
latest.gas_used,
|
||||
base_fee = calcEip1599BaseFee(GasInt.saturate latest.gas_limit,
|
||||
GasInt.saturate latest.gas_used,
|
||||
latest.base_fee_per_gas)
|
||||
|
||||
var payload = bellatrix.ExecutionPayloadForSigning(
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 9b6497ed8a05ba25ee47142f3fc1f61742b51a6c
|
||||
Subproject commit f169068df6c11a2aeba27584c60e354e19c42e94
|
Loading…
Reference in New Issue