-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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:fountain:add grant-datacap support #10856
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.
LGTM, thanks! (I'm not an expert in FIL+ though)
smsg, err = h.api.MpoolPushMessage( | ||
h.ctx, &types.Message{ | ||
Params: params, | ||
From: h.from, |
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.
I would consider sanity-checking that h.from
is a valid verifier (notary) with enough data cap for this step, but that's optional.
For example of how to do so:
Lines 656 to 676 in 6ca975e
func checkNotary(ctx context.Context, api v0api.FullNode, vaddr address.Address) (bool, abi.StoragePower, error) { | |
vid, err := api.StateLookupID(ctx, vaddr, types.EmptyTSK) | |
if err != nil { | |
return false, big.Zero(), err | |
} | |
act, err := api.StateGetActor(ctx, verifreg.Address, types.EmptyTSK) | |
if err != nil { | |
return false, big.Zero(), err | |
} | |
apibs := blockstore.NewAPIBlockstore(api) | |
store := adt.WrapStore(ctx, cbor.NewCborStore(apibs)) | |
st, err := verifreg.Load(store, act) | |
if err != nil { | |
return false, big.Zero(), err | |
} | |
return st.VerifierDataCap(vid) | |
} |
Related Issues
adding the support to grant datacap from fountain
Proposed Changes
Add a new endpoint for grant datacap.
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