mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-27 23:26:44 +00:00
Removed special delegate value logic as it's not needed, the tracer does the correct thing
This commit is contained in:
parent
4c221a04d4
commit
8677894b94
2 changed files with 8 additions and 10 deletions
|
|
@ -22,6 +22,7 @@ import (
|
|||
"runtime"
|
||||
"strings"
|
||||
|
||||
"github.com/ethereum/go-ethereum/eth/tracers"
|
||||
"github.com/ethereum/go-ethereum/internal/version"
|
||||
"github.com/ethereum/go-ethereum/params"
|
||||
"github.com/urfave/cli/v2"
|
||||
|
|
@ -57,7 +58,7 @@ The output of this command is supposed to be machine-readable.
|
|||
Usage: "Checks (online) for known Geth security vulnerabilities",
|
||||
ArgsUsage: "<versionstring (optional)>",
|
||||
Description: `
|
||||
The version-check command fetches vulnerability-information from https://geth.ethereum.org/docs/vulnerabilities/vulnerabilities.json,
|
||||
The version-check command fetches vulnerability-information from https://geth.ethereum.org/docs/vulnerabilities/vulnerabilities.json,
|
||||
and displays information about any security vulnerabilities that affect the currently executing version.
|
||||
`,
|
||||
}
|
||||
|
|
@ -74,6 +75,7 @@ func printVersion(ctx *cli.Context) error {
|
|||
|
||||
fmt.Println(strings.Title(clientIdentifier))
|
||||
fmt.Println("Version:", params.VersionWithMeta)
|
||||
fmt.Println("Firehose Tracer Protocol Version: fh", tracers.FirehoseProtocolVersion)
|
||||
if git.Commit != "" {
|
||||
fmt.Println("Git Commit:", git.Commit)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ import (
|
|||
"github.com/ethereum/go-ethereum/core/vm"
|
||||
"github.com/ethereum/go-ethereum/crypto"
|
||||
"github.com/ethereum/go-ethereum/eth/tracers/directory"
|
||||
"github.com/ethereum/go-ethereum/params"
|
||||
"github.com/ethereum/go-ethereum/rlp"
|
||||
pbeth "github.com/streamingfast/firehose-ethereum/types/pb/sf/ethereum/type/v2"
|
||||
"golang.org/x/exp/maps"
|
||||
|
|
@ -74,10 +75,11 @@ type Firehose struct {
|
|||
latestCallStartSuicided bool
|
||||
}
|
||||
|
||||
const FirehoseProtocolVersion = "3.0"
|
||||
|
||||
func NewFirehoseLogger() *Firehose {
|
||||
// FIXME: Where should we put our actual INIT line?
|
||||
// FIXME: Pickup version from go-ethereum (PR comment)
|
||||
printToFirehose("INIT", "2.3", "geth", "1.12.0")
|
||||
printToFirehose("INIT", FirehoseProtocolVersion, "geth", params.Version)
|
||||
|
||||
return &Firehose{
|
||||
// Global state
|
||||
|
|
@ -460,12 +462,6 @@ func (f *Firehose) callStart(source string, callType pbeth.CallType, from common
|
|||
input = nil
|
||||
}
|
||||
|
||||
v := firehoseBigIntFromNative(value)
|
||||
if callType == pbeth.CallType_DELEGATE {
|
||||
// If it's a delegate call, the there should be a call in the stack and value should be parent's value
|
||||
v = f.callStack.Peek().Value
|
||||
}
|
||||
|
||||
call := &pbeth.Call{
|
||||
// Known Firehose issue: Ref 042a2ff03fd623f151d7726314b8aad6 (see below)
|
||||
//
|
||||
|
|
@ -477,7 +473,7 @@ func (f *Firehose) callStart(source string, callType pbeth.CallType, from common
|
|||
Address: to.Bytes(),
|
||||
// We need to clone `input` received by the tracer as it's re-used within Geth!
|
||||
Input: bytes.Clone(input),
|
||||
Value: v,
|
||||
Value: firehoseBigIntFromNative(value),
|
||||
GasLimit: gas,
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue