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

Limit enclave fed L1 receipts to obscuro-relevant tx #1495

Merged
merged 5 commits into from
Sep 7, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions go/common/enclave.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,6 @@ type Enclave interface {
StreamL2Updates() (chan StreamL2UpdatesResponse, func())
// DebugEventLogRelevancy returns the logs of a transaction
DebugEventLogRelevancy(hash gethcommon.Hash) (json.RawMessage, SystemError)

Config() (*ObscuroEnclaveInfo, SystemError)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This method existed because there was some config (sequencerID and message bus address) that wasn't available to the host but we wanted to serve those details on obscuroscan API. Since I needed one of them I thought I might as well add both properties and remove the method.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if it might still be useful in the HA setting.
Even as a sanity check to spot config problems early. Basically, when a host starts, or when an enclave is added, the host checks that the config matches the enclave

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we were planning to bake the static network level config into the enclave image which we sign. I agree something like that could be useful but I feel like we haven't reached our end-state of the config situation yet so kinda hard to predict.

Don't feel too strongly either way though, I can put it back if you prefer?

}

// EnclaveScan represents the methods that are used for data scanning in the enclave
Expand All @@ -153,9 +151,3 @@ type ProducedSecretResponse struct {
RequesterID gethcommon.Address
HostAddress string
}

// ObscuroEnclaveInfo contains the data to return on Config requests
type ObscuroEnclaveInfo struct {
SequencerID gethcommon.Address
MessageBusAddress gethcommon.Address
}
4 changes: 2 additions & 2 deletions go/common/host/services.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ type L1BlockRepository interface {
// FetchNextBlock returns the next canonical block after a given block hash
// It returns the new block, a bool which is true if the block is the current L1 head and a bool if the block is on a different fork to prevBlock
FetchNextBlock(prevBlock gethcommon.Hash) (*types.Block, bool, error)
// FetchReceipts returns the receipts for a given L1 block
FetchReceipts(block *common.L1Block) types.Receipts
// FetchObscuroReceipts returns the receipts for a given L1 block
FetchObscuroReceipts(block *common.L1Block) types.Receipts
}

// L1BlockHandler is an interface for receiving new blocks from the repository as they arrive
Expand Down
Loading