-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Use EthHash compatible type for subscription and filter IDs #9808
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would the following refactor be possible:
- Move the new
FilterID
type tochain/types/event.go
- Have the API use
FilterID
instead ofEthFilterID
- Drop
EthFilterID
entirely?
chain/events/filter/store.go
Outdated
return FilterID{}, xerrors.Errorf("new uuid: %w", err) | ||
} | ||
id := FilterID{} | ||
copy(id[:], rawid[:]) // uuid is 16 bytes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
copy(id[:], rawid[:]) // uuid is 16 bytes | |
copy(id[:], rawid) // uuid is 16 bytes, the last 16 bytes are zeroed |
Yes to these two
We need to keep this to preserve the Ethereum specific json marshalling |
@arajasek PTAL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Related Issues
Fixes filecoin-project/ref-fvm#1189 and filecoin-project/ref-fvm#1208
Fixes some itest breakage introduced around 23007b0
Proposed Changes
Uses 32 byte arrays for subscriiption and filter ids, populated from a 16 byte uuid which should be good enough randomness.
Additional Info
Checklist
Before you mark the PR ready for review, please make sure that:
<PR type>: <area>: <change being made>
fix: mempool: Introduce a cache for valid signatures
PR type
: fix, feat, build, chore, ci, docs, perf, refactor, revert, style, testarea
, e.g. api, chain, state, market, mempool, multisig, networking, paych, proving, sealing, wallet, deps