Skip to content

Commit

Permalink
Add Verified Data pages + obscuro Info endpoint (#1476)
Browse files Browse the repository at this point in the history
* Add Verified Data pages + obscuro Info endpoint

* making sure the host only calls the config once

* Changing data struct names
  • Loading branch information
otherview authored Aug 22, 2023
1 parent 61d2517 commit 2e2b201
Show file tree
Hide file tree
Showing 23 changed files with 1,642 additions and 1,212 deletions.
8 changes: 8 additions & 0 deletions go/common/enclave.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@ type Enclave interface {
StreamL2Updates() (chan StreamL2UpdatesResponse, func())
// DebugEventLogRelevancy returns the logs of a transaction
DebugEventLogRelevancy(hash gethcommon.Hash) (json.RawMessage, SystemError)

Config() (*ObscuroEnclaveInfo, SystemError)
}

// EnclaveScan represents the methods that are used for data scanning in the enclave
Expand All @@ -151,3 +153,9 @@ 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
}
3 changes: 3 additions & 0 deletions go/common/host/host.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ type Host interface {

// HealthCheck returns the health status of the host + enclave + db
HealthCheck() (*HealthCheck, error)

// ObscuroConfig returns the info of the Obscuro network
ObscuroConfig() (*common.ObscuroNetworkInfo, error)
}

type BlockStream struct {
Expand Down
7 changes: 7 additions & 0 deletions go/common/query_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,10 @@ type PrivateCustomQueryListTransactions struct {
Address common.Address `json:"address"`
Pagination QueryPagination `json:"pagination"`
}

type ObscuroNetworkInfo struct {
ManagementContractAddress common.Address
L1StartHash common.Hash
SequencerID common.Address
MessageBusAddress common.Address
}
Loading

0 comments on commit 2e2b201

Please sign in to comment.