Skip to content
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

Merged
merged 8 commits into from
Dec 17, 2024
Merged

Move tee address #392

merged 8 commits into from
Dec 17, 2024

Conversation

zacshowa
Copy link
Member

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.

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 {

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?

Copy link
Member Author

@zacshowa zacshowa Dec 17, 2024

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

Copy link

@Sneh1999 Sneh1999 left a 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.

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?

Copy link
Member Author

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

@zacshowa zacshowa merged commit 30689d6 into celestia-integration Dec 17, 2024
13 checks passed
@zacshowa zacshowa deleted the move-tee-address branch December 17, 2024 20:48
ImJeremyHe pushed a commit that referenced this pull request Dec 18, 2024
* 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)
Sneh1999 added a commit that referenced this pull request Dec 18, 2024
* 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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants