Skip to content

Commit

Permalink
Merge pull request #11603 from filecoin-project/rvagg/ddo-verified
Browse files Browse the repository at this point in the history
test: DDO onboarding non-market verified data
  • Loading branch information
aarshkshah1992 authored Feb 7, 2024
2 parents b5fba58 + f9c891b commit 4cfd4f0
Show file tree
Hide file tree
Showing 7 changed files with 486 additions and 114 deletions.
6 changes: 0 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -542,12 +542,6 @@ workflows:
- docs-check:
requires:
- build
- test:
name: test-itest-actor_events_filter
requires:
- build
suite: itest-actor_events_filter
target: "./itests/actor_events_filter_test.go"
- test:
name: test-itest-api
requires:
Expand Down
14 changes: 2 additions & 12 deletions cmd/lotus-shed/indexes.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,11 @@ import (
"strings"

"github.com/mitchellh/go-homedir"
"github.com/multiformats/go-varint"
"github.com/urfave/cli/v2"
"golang.org/x/xerrors"

"github.com/filecoin-project/go-address"
"github.com/filecoin-project/go-state-types/abi"
builtintypes "github.com/filecoin-project/go-state-types/builtin"
"github.com/filecoin-project/go-state-types/crypto"
"github.com/filecoin-project/go-state-types/exitcode"

Expand Down Expand Up @@ -109,6 +107,7 @@ var backfillEventsCmd = &cli.Command{

addressLookups := make(map[abi.ActorID]address.Address)

// TODO: We don't need this address resolution anymore once https://github.com/filecoin-project/lotus/issues/11594 lands
resolveFn := func(ctx context.Context, emitter abi.ActorID, ts *types.TipSet) (address.Address, bool) {
// we only want to match using f4 addresses
idAddr, err := address.NewIDAddress(uint64(emitter))
Expand All @@ -118,18 +117,9 @@ var backfillEventsCmd = &cli.Command{

actor, err := api.StateGetActor(ctx, idAddr, ts.Key())
if err != nil || actor.Address == nil {
return address.Undef, false
}

// if robust address is not f4 then we won't match against it so bail early
if actor.Address.Protocol() != address.Delegated {
return address.Undef, false
return idAddr, true
}

// we have an f4 address, make sure it's assigned by the EAM
if namespace, _, err := varint.FromUvarint(actor.Address.Payload()); err != nil || namespace != builtintypes.EthereumAddressManagerActorID {
return address.Undef, false
}
return *actor.Address, true
}

Expand Down
8 changes: 5 additions & 3 deletions documentation/en/default-lotus-config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,9 @@
# env var: LOTUS_FEVM_ENABLEETHRPC
#EnableEthRPC = false

# EnableActorEventsAPI enables the Actor events API that enables clients to consume events emitted by (smart contracts + built-in Actors).
# This will also enable the RealTimeFilterAPI and HistoricFilterAPI by default, but they can be disabled by config options above.
#
# type: bool
# env var: LOTUS_FEVM_ENABLEACTOREVENTSAPI
#EnableActorEventsAPI = false
Expand All @@ -342,17 +345,16 @@
#EthTxHashMappingLifetimeDays = 0

[Fevm.Events]
# EnableEthRPC enables APIs that
# DisableRealTimeFilterAPI will disable the RealTimeFilterAPI that can create and query filters for actor events as they are emitted.
# The API is enabled when EnableEthRPC is true, but can be disabled selectively with this flag.
# The API is enabled when EnableEthRPC or EnableActorEventsAPI is true, but can be disabled selectively with this flag.
#
# type: bool
# env var: LOTUS_FEVM_EVENTS_DISABLEREALTIMEFILTERAPI
#DisableRealTimeFilterAPI = false

# DisableHistoricFilterAPI will disable the HistoricFilterAPI that can create and query filters for actor events
# that occurred in the past. HistoricFilterAPI maintains a queryable index of events.
# The API is enabled when EnableEthRPC is true, but can be disabled selectively with this flag.
# The API is enabled when EnableEthRPC or EnableActorEventsAPI is true, but can be disabled selectively with this flag.
#
# type: bool
# env var: LOTUS_FEVM_EVENTS_DISABLEHISTORICFILTERAPI
Expand Down
92 changes: 0 additions & 92 deletions itests/actor_events_filter_test.go

This file was deleted.

Loading

0 comments on commit 4cfd4f0

Please sign in to comment.