forked from cerc-io/laconicd-deprecated
chore (deps): Update geth version to v1.10.25 (#1413)
* build(deps): bump github.com/ethereum/go-ethereum Bumps [github.com/ethereum/go-ethereum](https://github.com/ethereum/go-ethereum) from 1.10.19 to 1.10.25. - [Release notes](https://github.com/ethereum/go-ethereum/releases) - [Commits](https://github.com/ethereum/go-ethereum/compare/v1.10.19...v1.10.25) --- updated-dependencies: - dependency-name: github.com/ethereum/go-ethereum dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * wip geth update * fix geth init flag order * add chainId to getTransaction. fix types comparison. update expected values on tests * wip add tracer config * tracers test * update tests * update to v1.10.25 * fix linter python * ignore error * fix lint * additional changes from diff * fix issues * solve lint issues * fix tests * fix flake * wrap types comparison in integration tests * fix integration tests * fix flake * update changelog Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> Co-authored-by: Freddy Caceres <facs95@gmail.com>
This commit is contained in:
co-authored by
dependabot[bot]
Federico Kunze Küllmer
Freddy Caceres
parent
d5917752a6
commit
71e51aabf6
@@ -420,7 +420,13 @@ func (k Keeper) TraceTx(c context.Context, req *types.QueryTraceTxRequest) (*typ
|
||||
txConfig.TxIndex++
|
||||
}
|
||||
|
||||
result, _, err := k.traceTx(ctx, cfg, txConfig, signer, tx, req.TraceConfig, false)
|
||||
var tracerConfig json.RawMessage
|
||||
if req.TraceConfig != nil && req.TraceConfig.TracerJsonConfig != "" {
|
||||
// ignore error. default to no traceConfig
|
||||
_ = json.Unmarshal([]byte(req.TraceConfig.TracerJsonConfig), &tracerConfig)
|
||||
}
|
||||
|
||||
result, _, err := k.traceTx(ctx, cfg, txConfig, signer, tx, req.TraceConfig, false, tracerConfig)
|
||||
if err != nil {
|
||||
// error will be returned with detail status from traceTx
|
||||
return nil, err
|
||||
@@ -473,7 +479,7 @@ func (k Keeper) TraceBlock(c context.Context, req *types.QueryTraceBlockRequest)
|
||||
ethTx := tx.AsTransaction()
|
||||
txConfig.TxHash = ethTx.Hash()
|
||||
txConfig.TxIndex = uint(i)
|
||||
traceResult, logIndex, err := k.traceTx(ctx, cfg, txConfig, signer, ethTx, req.TraceConfig, true)
|
||||
traceResult, logIndex, err := k.traceTx(ctx, cfg, txConfig, signer, ethTx, req.TraceConfig, true, nil)
|
||||
if err != nil {
|
||||
result.Error = err.Error()
|
||||
continue
|
||||
@@ -502,6 +508,7 @@ func (k *Keeper) traceTx(
|
||||
tx *ethtypes.Transaction,
|
||||
traceConfig *types.TraceConfig,
|
||||
commitMessage bool,
|
||||
tracerJSONConfig json.RawMessage,
|
||||
) (*interface{}, uint, error) {
|
||||
// Assemble the structured logger or the JavaScript tracer
|
||||
var (
|
||||
@@ -542,7 +549,7 @@ func (k *Keeper) traceTx(
|
||||
}
|
||||
|
||||
if traceConfig.Tracer != "" {
|
||||
if tracer, err = tracers.New(traceConfig.Tracer, tCtx); err != nil {
|
||||
if tracer, err = tracers.New(traceConfig.Tracer, tCtx, tracerJSONConfig); err != nil {
|
||||
return nil, 0, status.Error(codes.Internal, err.Error())
|
||||
}
|
||||
}
|
||||
|
||||
@@ -424,7 +424,8 @@ func (k *Keeper) ApplyMessageWithConfig(ctx sdk.Context,
|
||||
return nil, errorsmod.Wrap(types.ErrGasOverflow, "apply message")
|
||||
}
|
||||
// refund gas
|
||||
leftoverGas += GasToRefund(stateDB.GetRefund(), msg.Gas()-leftoverGas, refundQuotient)
|
||||
temporaryGasUsed := msg.Gas() - leftoverGas
|
||||
leftoverGas += GasToRefund(stateDB.GetRefund(), temporaryGasUsed, refundQuotient)
|
||||
|
||||
// EVM execution error needs to be available for the JSON-RPC client
|
||||
var vmError string
|
||||
@@ -449,7 +450,7 @@ func (k *Keeper) ApplyMessageWithConfig(ctx sdk.Context,
|
||||
if msg.Gas() < leftoverGas {
|
||||
return nil, errorsmod.Wrapf(types.ErrGasOverflow, "message gas limit < leftover gas (%d < %d)", msg.Gas(), leftoverGas)
|
||||
}
|
||||
temporaryGasUsed := msg.Gas() - leftoverGas
|
||||
|
||||
gasUsed := sdk.MaxDec(minimumGasUsed, sdk.NewDec(int64(temporaryGasUsed))).TruncateInt().Uint64()
|
||||
// reset leftoverGas, to be used by the tracer
|
||||
leftoverGas = msg.Gas() - gasUsed
|
||||
|
||||
Reference in New Issue
Block a user