-
Notifications
You must be signed in to change notification settings - Fork 115
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
go/runtime: Reduce downtime for TEE runtime upgrades #5188
Conversation
e6a3b0f
to
64324fc
Compare
9a63324
to
fb367c5
Compare
71eb9e4
to
1cfafd0
Compare
c27ec60
to
1538927
Compare
1538927
to
242c958
Compare
Codecov Report
@@ Coverage Diff @@
## master #5188 +/- ##
==========================================
- Coverage 61.47% 61.30% -0.17%
==========================================
Files 512 512
Lines 54051 54211 +160
==========================================
+ Hits 33227 33234 +7
- Misses 16611 16745 +134
- Partials 4213 4232 +19
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
7886471
to
53fc150
Compare
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.
Tested locally and warm-up works. Nice 👍
go/runtime/host/sandbox/sandbox.go
Outdated
@@ -225,6 +241,13 @@ func (r *sandboxedRuntime) Stop() { | |||
|
|||
// Implements host.EmitEvent. | |||
func (r *sandboxedRuntime) EmitEvent(ev *host.Event) { | |||
// Update runtime's CapabilityTEE in case this is an update event. |
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 find this comment a bit confusing as it assumes all events can be handled here, but start/stop updates are not. However, the code still works as expected, as it knows that only update events can be sent through this method.
Also not sure if EmitEvent
is the right place to change this value. Maybe we subscribe/listen to these events in the manager and change TEE capabilities only there.
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.
Agreed, refactored this a bit.
go/worker/common/committee/node.go
Outdated
var nextVersion *version.Version | ||
if config.GlobalConfig.Mode == config.ModeCompute { | ||
nextDeploy := n.CurrentDescriptor.NextDeployment(n.CurrentEpoch) | ||
if nextDeploy != 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.
if nextDeploy != nil { | |
if nextDeploy != nil && nextDeploy.ValidFrom - n.CurrentEpoch < 12345 { |
We probably don't want to start doing attestations to early.
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.
Agreed, made this configurable, please take a look.
299e4a6
to
9a46f82
Compare
9a46f82
to
1b2b6b3
Compare
Based on #5187