-
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
NV18: Filecoin EVM runtime + Actor Events + EthAccount + EAM + f4 addressing #9998
Conversation
Make it use GasEstimateMessageGas, which applies overestimation by default. This accounts for inclusion costs.
Also updates the actors to accommodate this change, and fix a bug in looking up addresses for f4 actors.
Co-authored-by: Raúl Kripalani <[email protected]>
We need to add full FEVM state support, but that will require merging master. This is enough for now. fixes filecoin-project/ref-fvm#1022
and skip a non-testing test; printing doesn't constitute testing.
Only when actors version is >= 10
it breaks the gen script in proxy_gen
it's in the actor state only if it is a v5 (or later) state tree
it's a dummy, but at least it makes tests pass
…ig + cleanups (#9970) Co-authored-by: raulk <[email protected]>
… and conversion methods (#9992)
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.
Let's do it.
// Use half the CPUs for pre-migration, but leave at least 3. | ||
workerCount := MigrationMaxWorkerCount | ||
if workerCount <= 4 { | ||
workerCount = 1 | ||
} else { | ||
workerCount /= 2 | ||
} |
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.
Not too sure about the math here, doesn't look like we always have at least 3 workers
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.
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.
It's at least 3 workers if possible -- that is, never take more than 1, if that would doing so would leave regular processing with fewer than 3. But do take at least one always.
} | ||
|
||
// Assume short lists of addresses | ||
// TODO: binary search for longer lists or restrict list length |
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.
Really easy with https://pkg.go.dev/sort#Search
"PRAGMA read_uncommitted = ON", | ||
} | ||
|
||
var ddls = []string{ |
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.
Don't we want to add at least some indexes here?
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.
Yep, we do. @iand wanted to get a good understanding of performance before indices are added, but I am fully onboard with adding them already since it's a no-brainer.
// TODO: I'm not thrilled about depending on filcns here, but I prefer this to duplicating logic | ||
if !filcns.IsValidForSending(nv, senderAct) { |
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.
Pretty sure one of the recently merged IPC PRs has moved this to a better place
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.
Probably on master, not on release/v1.20.0; we'll need to reconcile once we merge release/v1.20.0 into master.
@@ -97,7 +97,7 @@ func (sm *selectedMessages) tryToAdd(mc *msgChain) bool { | |||
sm.msgs = append(sm.msgs, mc.msgs...) | |||
sm.blsLimit -= l | |||
sm.gasLimit -= mc.gasLimit | |||
} else if mc.sigType == crypto.SigTypeSecp256k1 { | |||
} else if mc.sigType == crypto.SigTypeSecp256k1 || mc.sigType == crypto.SigTypeDelegated { |
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.
Not related to this particular line, but I feel like after the upgrade we should rename places which handle both delegated and secp messages to signed
or something like that (including the field in blockheader, which we can rename because it's tuple-serialized).
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.
Yep, Signature-bearing or something rather than Signed. (BLS message are also signed, we just aggregate their signatures when we pack them into a block).
@@ -0,0 +1,53 @@ | |||
package chain |
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.
Not a fan of putting things in the chain package, can easily generate dependency loops
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.
Ack, if that's the case we can move out. This used to be in a signatures package, but @arajasek asked to move it out. We can move it somewhere else easily.
} | ||
default: | ||
// XXX: Hack to make sending from f099 (and others) "just work". | ||
// REMOVE ME. |
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.
REMOVE ME
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.
Fixed.
@@ -42,7 +42,7 @@ type StateManagerAPI interface { | |||
GetPaychState(ctx context.Context, addr address.Address, ts *types.TipSet) (*types.Actor, paych.State, error) | |||
LoadActorTsk(ctx context.Context, addr address.Address, tsk types.TipSetKey) (*types.Actor, error) | |||
LookupID(ctx context.Context, addr address.Address, ts *types.TipSet) (address.Address, error) | |||
ResolveToKeyAddress(ctx context.Context, addr address.Address, ts *types.TipSet) (address.Address, error) | |||
ResolveToDeterministicAddress(ctx context.Context, addr address.Address, ts *types.TipSet) (address.Address, error) |
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.
Pretty sure this rename breaks lite mode as StateManagerAPI is also supplied from api.Gateway
Final landable version of #9617 with review comments addressed.
Related Issues
This mega-PR is the result of several months of development on the FVM Milestone 2.1 (Filecoin EVM compatibility). It includes the Lotus-side implementation of the following FIPs:
Proposed Changes
This 14,000 LoC PR has a ton of changes, but they broadly fall into these headlines:
eth
CLI has been implemented for diagnostics and quick experimentation.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