-
Notifications
You must be signed in to change notification settings - Fork 9
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
Move tee address #392
Move tee address #392
Changes from all commits
e77df10
0e1b7d9
70b1ea5
0230b1f
6a03d80
50e3beb
2974fc6
39bcf41
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -84,8 +84,9 @@ type TransactionStreamer struct { | |
espressoTxnsPollingInterval time.Duration | ||
espressoSwitchDelayThreshold uint64 | ||
// Public these fields for testing | ||
HotshotDown bool | ||
UseEscapeHatch bool | ||
HotshotDown bool | ||
UseEscapeHatch bool | ||
espressoTEEVerifierAddress common.Address | ||
} | ||
|
||
type TransactionStreamerConfig struct { | ||
|
@@ -670,21 +671,6 @@ func (s *TransactionStreamer) AddFakeInitMessage() error { | |
}}) | ||
} | ||
|
||
func (s *TransactionStreamer) isEspressoMode() (bool, error) { | ||
config, err := s.exec.GetArbOSConfigAtHeight(0) // Pass 0 to get the ArbOS config at current block height. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Actually can we remove the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I was planning to do that in a separate PR with an issue created here |
||
if err != nil { | ||
return false, fmt.Errorf("error obtaining arbos config: %w", err) | ||
} | ||
if config == nil { | ||
return false, fmt.Errorf("arbos config is not defined") | ||
} | ||
isSetInConfig := config.ArbitrumChainParams.EspressoTEEVerifierAddress != common.Address{} | ||
if !isSetInConfig { | ||
return false, nil | ||
} | ||
return true, nil | ||
} | ||
|
||
// Used in redis tests | ||
func (s *TransactionStreamer) GetMessageCountSync(t *testing.T) (arbutil.MessageIndex, error) { | ||
s.insertionMutex.Lock() | ||
|
@@ -1777,10 +1763,7 @@ func getLogLevel(err error) func(string, ...interface{}) { | |
|
||
func (s *TransactionStreamer) espressoSwitch(ctx context.Context, ignored struct{}) time.Duration { | ||
retryRate := s.espressoTxnsPollingInterval * 50 | ||
enabledEspresso, err := s.isEspressoMode() | ||
if err != nil { | ||
return retryRate | ||
} | ||
enabledEspresso := s.espressoTEEVerifierAddress != common.Address{} | ||
if enabledEspresso { | ||
err := s.toggleEscapeHatch(ctx) | ||
if err != nil { | ||
|
This file was deleted.
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 are we deleting this check?
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.
Well this check only happens when the batch poster is started to prevent it from posting any data until the chain config was updated. Given we don't populate this at runtime anymore, the check doesn't matter