-
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
[wip] feat: sturdypost: WindowPoSt Submit #11380
Conversation
@@ -24,5 +24,11 @@ create table wdpost_proofs | |||
partition bigint not null, | |||
submit_at_epoch bigint not null, | |||
submit_by_epoch bigint not null, | |||
proof_message bytea | |||
proof_message bytea, |
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.
Should rename this to proof_params before merging
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
@@ -64,10 +65,13 @@ func Register(db *harmonydb.DB, hostnameAndPort string) (*Reg, error) { | |||
SELECT id FROM inserted; | |||
`, hostnameAndPort, reg.Cpu, reg.Ram, reg.Gpu).Scan(&ownerID) | |||
if err != nil { | |||
return nil, err | |||
return nil, xerrors.Errorf("inserting machine entry: %w", err) |
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.
Why not use fmt.Errorf which has %w now?
as: as, | ||
} | ||
|
||
if err := pcs.AddHandler(res.processHeadChange); err != nil { |
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.
What happens for these case when the db entry is added after its submit epoch has started (potentially common for WinningPoSt)
-- a "check_now()" type of function called from the proof creator could help here.
GasEstimateGasPremium(_ context.Context, nblocksincl uint64, sender address.Address, gaslimit int64, tsk types.TipSetKey) (types.BigInt, error) | ||
} | ||
|
||
type WdPostSubmitTask struct { |
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.
How generic could this be made WRT having it support WindowPoSt and/or sealing?
I ask because the database tables will be written after this goes out and any attempt to make it generic would involve data migration or an interface to swap out submit types that use different tables.
Related Issues
Closes #11379
Proposed Changes
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