Skip to content

Commit

Permalink
clarifications
Browse files Browse the repository at this point in the history
  • Loading branch information
tudor-malene committed Sep 13, 2024
1 parent 1e4cb72 commit 3267e3e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
11 changes: 6 additions & 5 deletions go/enclave/core/event_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,19 @@ import (
"github.com/ethereum/go-ethereum/core/types"
)

// EventVisibilityConfig - configuration per event by the dApp developer
type EventVisibilityConfig struct {
AutoConfig bool
AutoConfig bool // true for events that have no explicit configuration
Public bool // everyone can see and query for this event
Topic1CanView, Topic2CanView, Topic3CanView *bool // If the event is private, and this is true, it means that the address from topic1 is an EOA that can view this event
Topic1CanView, Topic2CanView, Topic3CanView *bool // If the event is not public, and this is true, it means that the address from topicI is an EOA that can view this event
SenderCanView *bool // if true, the tx signer will see this event. Default false
}

// ContractVisibilityConfig represents the configuration as defined by the dApp developer in the smart contract
type ContractVisibilityConfig struct {
AutoConfig bool // true - if the platform has to autodetect
Transparent *bool
EventConfigs map[gethcommon.Hash]*EventVisibilityConfig
AutoConfig bool // true for contracts that have no explicit configuration
Transparent *bool // users can configure contracts to be fully transparent. All events will be public, and it will expose the internal storage.
EventConfigs map[gethcommon.Hash]*EventVisibilityConfig // map from the event log signature (topics[0]) to the settings
}

type TxExecResult struct {
Expand Down
3 changes: 1 addition & 2 deletions go/host/storage/hostdb/block.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package hostdb

import (
"fmt"
"strings"

"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/rlp"
Expand All @@ -24,7 +23,7 @@ func AddBlock(dbtx *dbTransaction, statements *SQLStatements, b *types.Header) e
b.Hash().Bytes(), // hash
header, // l1 block header
)
if err != nil && !strings.Contains(err.Error(), " UNIQUE constraint failed") {
if err != nil {
return fmt.Errorf("could not insert block. Cause: %w", err)
}

Expand Down

0 comments on commit 3267e3e

Please sign in to comment.