-
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
Conversation
This commit moves the TEE verifier contract address to the transaction streamer, configurable via the batch posters config.
Koanf cannot parse a common.Address by default, so we should use a string when taking in this config option.
var err error | ||
espresso, _ := b.streamer.isEspressoMode() | ||
if !espresso { | ||
if b.streamer.lightClientReader != nil && b.streamer.espressoClient != 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.
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
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.
Thanks @zacshowa! LGTM
@@ -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 comment
The reason will be displayed to describe this comment to others. Learn more.
Actually can we remove the GetArbOSConfigAtHeight
function? What do you think?
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 was planning to do that in a separate PR with an issue created here
* move espressoTeeVerifierAddr to transaction streamer This commit moves the TEE verifier contract address to the transaction streamer, configurable via the batch posters config. * Fix tests and transaction_streamer * use a string for tee verifier address Koanf cannot parse a common.Address by default, so we should use a string when taking in this config option. * fix compilation * fix e2e test * Fix config parsing * Fix lint and run formatter * Remove outdated test (cherry picked from commit 30689d6)
* Move tee address (#392) * move espressoTeeVerifierAddr to transaction streamer This commit moves the TEE verifier contract address to the transaction streamer, configurable via the batch posters config. * Fix tests and transaction_streamer * use a string for tee verifier address Koanf cannot parse a common.Address by default, so we should use a string when taking in this config option. * fix compilation * fix e2e test * Fix config parsing * Fix lint and run formatter * Remove outdated test (cherry picked from commit 30689d6) * Add attestation quote to Espresso payload (#385) * Add attestation quote to Espresso payload * cleanup code * fix lint * add position * fix verify namespace proof bug * Increase hotshot transaction limit * build hotshot payload and add unitests for it * Verify merkle proof first * Rename * push minor fixes --------- Co-authored-by: ImJeremyHe <[email protected]> (cherry picked from commit 47e6010) --------- Co-authored-by: Zach Showalter <[email protected]> Co-authored-by: Sneh Koul <[email protected]>
Closes #387
This PR:
Moves the espresso tee verifier address to reside in the batch poster and transaction streamer as opposed to the chain config
This PR does not:
Clean up the unused arbos config fetching code, tests, or update the test-node /migration test to reflect these changes.
Key places to review:
arbnode/batch_poster.go
arbnode/transaction_streamer.go
How to test this PR:
run the E2E test
Things tested
A modified version of the migration test passes locally.