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: Add trace filter API #12123

Merged
merged 48 commits into from
Jul 25, 2024
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
95bec19
initial commit for trace filter wip
snissn Jun 20, 2024
0ec7286
trace filter for gateway
snissn Jun 20, 2024
5751fba
trace filter implementation
snissn Jun 20, 2024
f773ca5
make gen
snissn Jun 20, 2024
9fd949d
implement after properly in trace_filter
snissn Jun 20, 2024
afae821
accept block numbers in hex format
snissn Jun 20, 2024
1f641ab
Merge branch 'master' into mikers/traceFilter
snissn Jun 25, 2024
ee51aac
trace_filter support for pending/latest/safe block numbers
snissn Jun 25, 2024
ac53ddb
run filter.FromBlock and filter.ToBlock through gw.checkBlkParam to m…
snissn Jun 27, 2024
10bdb58
Update node/impl/full/eth.go
snissn Jun 27, 2024
7b4c464
docsgen merge
snissn Jul 1, 2024
f67055d
document EthTraceFilterCriteria
snissn Jul 1, 2024
f74fd60
refactor: Handle nil pointers and optional defaults in EthBlockNumber…
snissn Jul 1, 2024
3d3609b
decode ToAddress and FromAddress in the caller function and re-use th…
snissn Jul 2, 2024
9edb692
bugfix for create trace and improve tests for trace filter
snissn Jul 3, 2024
f2f5458
Update node/impl/full/eth.go
snissn Jul 4, 2024
4344a52
fix for create type eth trace filter and improve tests
Jul 4, 2024
4bdd290
make gen
Jul 4, 2024
3473837
To and From slices do not need to be pointers
Jul 4, 2024
7598de6
use ethtypes.EthAddressList for FromAddress/ToAddress for trace_filter
Jul 5, 2024
9e5eac6
use *EthUint64 for filter.Count and filter.After
snissn Jul 16, 2024
ab9d541
merge
snissn Jul 16, 2024
c6597eb
changelog
snissn Jul 16, 2024
0173fc4
fix test type
snissn Jul 16, 2024
5cc2b26
decodeAddressFilter is unused
snissn Jul 16, 2024
1323ec7
improve trace filter example doc
snissn Jul 17, 2024
78c6162
Configuring EthTraceFilterMaxResults sets a limit to how many results…
snissn Jul 18, 2024
3ccbfc5
Merge branch 'master' into mikers/traceFilter
snissn Jul 18, 2024
d981c8f
config gen
snissn Jul 18, 2024
d470b2f
block number is flaky and not needed for test
snissn Jul 18, 2024
0569aef
Update node/impl/full/eth.go
snissn Jul 23, 2024
aabb500
Update node/impl/full/eth.go
snissn Jul 23, 2024
bfe56fb
bugfix
snissn Jul 23, 2024
1deb787
remove indentation style fix
snissn Jul 23, 2024
3b30a55
add null pointer check
snissn Jul 23, 2024
63e6cf3
Create a copy of blockTrace to avoid pointer quirks
snissn Jul 23, 2024
5a30419
method can be private
snissn Jul 23, 2024
bab6e1e
clean up doc for EthTraceFilterCriteria
snissn Jul 23, 2024
68def91
increase EthTraceFilterMaxResults to 500
snissn Jul 23, 2024
494deab
clean up earliest
snissn Jul 23, 2024
3a49b84
bury getEthBlockNumberFromString into EthTraceFilter to reduce confusion
snissn Jul 23, 2024
38fe510
merge
snissn Jul 23, 2024
bfbfacc
Update node/config/types.go
snissn Jul 24, 2024
0db2efe
Update node/impl/full/eth.go
snissn Jul 24, 2024
94dab56
Update node/impl/full/eth.go
snissn Jul 24, 2024
b9d898f
type fixes a.EthTraceFilterMaxResults
snissn Jul 24, 2024
56440b5
make docsgen-cli
snissn Jul 24, 2024
16468a6
merge + run make docs gen
snissn Jul 24, 2024
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
3 changes: 3 additions & 0 deletions api/api_full.go
Original file line number Diff line number Diff line change
Expand Up @@ -828,6 +828,9 @@ type FullNode interface {
// Implmements OpenEthereum-compatible API method trace_transaction
EthTraceTransaction(ctx context.Context, txHash string) ([]*ethtypes.EthTraceTransaction, error) //perm:read

// Implements OpenEthereum-compatible API method trace_filter
EthTraceFilter(ctx context.Context, filter ethtypes.EthTraceFilterCriteria) ([]*ethtypes.EthTraceFilterResult, error) //perm:read

// CreateBackup creates node backup onder the specified file name. The
// method requires that the lotus daemon is running with the
// LOTUS_BACKUP_BASE_PATH environment variable set to some path, and that
Expand Down
1 change: 1 addition & 0 deletions api/api_gateway.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ type Gateway interface {
EthTraceBlock(ctx context.Context, blkNum string) ([]*ethtypes.EthTraceBlock, error)
EthTraceReplayBlockTransactions(ctx context.Context, blkNum string, traceTypes []string) ([]*ethtypes.EthTraceReplayBlockTransaction, error)
EthTraceTransaction(ctx context.Context, txHash string) ([]*ethtypes.EthTraceTransaction, error)
EthTraceFilter(ctx context.Context, filter ethtypes.EthTraceFilterCriteria) ([]*ethtypes.EthTraceFilterResult, error)

GetActorEventsRaw(ctx context.Context, filter *types.ActorEventFilter) ([]*types.ActorEvent, error)
SubscribeActorEventsRaw(ctx context.Context, filter *types.ActorEventFilter) (<-chan *types.ActorEvent, error)
Expand Down
1 change: 1 addition & 0 deletions api/eth_aliases.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ func CreateEthRPCAliases(as apitypes.Aliaser) {
as.AliasMethod("trace_block", "Filecoin.EthTraceBlock")
as.AliasMethod("trace_replayBlockTransactions", "Filecoin.EthTraceReplayBlockTransactions")
as.AliasMethod("trace_transaction", "Filecoin.EthTraceTransaction")
as.AliasMethod("trace_filter", "Filecoin.EthTraceFilter")

as.AliasMethod("net_version", "Filecoin.NetVersion")
as.AliasMethod("net_listening", "Filecoin.NetListening")
Expand Down
15 changes: 15 additions & 0 deletions api/mocks/mock_full.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 26 additions & 0 deletions api/proxy_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading