Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: eth: harden event processing #10215

Merged
merged 4 commits into from
Feb 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified build/openrpc/full.json.gz
Binary file not shown.
Binary file modified build/openrpc/gateway.json.gz
Binary file not shown.
9 changes: 1 addition & 8 deletions chain/types/ethtypes/eth_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,6 @@ import (
"github.com/filecoin-project/lotus/lib/must"
)

var (
EthTopic1 = "t1"
EthTopic2 = "t2"
EthTopic3 = "t3"
EthTopic4 = "t4"
)

var ErrInvalidAddress = errors.New("invalid Filecoin Eth address")

type EthUint64 uint64
Expand Down Expand Up @@ -626,7 +619,7 @@ type EthLog struct {
Data EthBytes `json:"data"`

// List of topics associated with the event log.
Topics []EthBytes `json:"topics"`
Topics []EthHash `json:"topics"`

// Following fields are derived from the transaction containing the log

Expand Down
2 changes: 1 addition & 1 deletion chain/types/ethtypes/eth_types_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ func TestEthFilterResultMarshalJSON(t *testing.T) {
TransactionHash: hash1,
BlockHash: hash2,
BlockNumber: 53,
Topics: []EthBytes{hash1[:]},
Topics: []EthHash{hash1},
Data: EthBytes(hash1[:]),
Address: addr,
}
Expand Down
2 changes: 1 addition & 1 deletion documentation/en/api-v1-unstable-methods.md
Original file line number Diff line number Diff line change
Expand Up @@ -2794,7 +2794,7 @@ Response:
"address": "0x5cbeecf99d3fdb3f25e309cc264f240bb0664031",
"data": "0x07",
"topics": [
"0x07"
"0x37690cfec6c1bf4c3b9288c7a5d783e98731e90b0a4c177c2a374c7a9427355e"
],
"removed": true,
"logIndex": "0x5",
Expand Down
Loading