-
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
PriceListByVersion #6766
PriceListByVersion #6766
Conversation
@@ -1054,14 +1054,15 @@ func (syncer *Syncer) checkBlockMessages(ctx context.Context, b *types.FullBlock | |||
return xerrors.Errorf("failed to load base state tree: %w", err) | |||
} | |||
|
|||
pl := vm.PricelistByEpoch(baseTs.Height()) | |||
nv := syncer.sm.GetNtwkVersion(ctx, b.Header.Height) |
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'm changing this from the base tipset's version to the block including the message's version which I think is the desired behavior.
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.
Technically this could break consensus if there is a message below the min price in the nv6.5 epoch, but that's probably fine (we just need to make sure that there isn't one)
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.
Good call out. I checked this against mainnet and this code syncs past the calico upgrade (265060 to 265241 so far) so we should be all good.
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.
Looks better than what we had, obviously filecoin-project/go-state-types#30 should land first (probably with the bigger version number changes) (also need the api version bump)
@@ -1054,14 +1054,15 @@ func (syncer *Syncer) checkBlockMessages(ctx context.Context, b *types.FullBlock | |||
return xerrors.Errorf("failed to load base state tree: %w", err) | |||
} | |||
|
|||
pl := vm.PricelistByEpoch(baseTs.Height()) | |||
nv := syncer.sm.GetNtwkVersion(ctx, b.Header.Height) |
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.
Technically this could break consensus if there is a message below the min price in the nv6.5 epoch, but that's probably fine (we just need to make sure that there isn't one)
f0a940c
to
e415aee
Compare
@@ -292,6 +296,18 @@ func (us UpgradeSchedule) Validate() error { | |||
return nil | |||
} | |||
|
|||
func (us UpgradeSchedule) GetNtwkVersion(e abi.ChainEpoch) (network.Version, 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.
@magik6k I added this so that the mpool could get current network version without having to construct a new stmgr and depend on chainstore. If you think this redundancy is unacceptable I can try a deeper refactor.
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.
Seems fine with me
@@ -54,8 +54,8 @@ func VersionForType(nodeType NodeType) (Version, error) { | |||
|
|||
// semver versions of the rpc api exposed | |||
var ( | |||
FullAPIVersion0 = newVer(1, 3, 0) | |||
FullAPIVersion1 = newVer(2, 1, 0) | |||
FullAPIVersion0 = newVer(1, 3, 1) |
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.
@Stebalien @magik6k is there anything else needed to finish bumping the api version?
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 think that is it.
3ead2e2
to
5547aa4
Compare
(marking as draft until we land filecoin-project/go-state-types#30) |
5547aa4
to
ebbecca
Compare
ebbecca
to
c130d2c
Compare
Closes #6652