Skip to content

Commit

Permalink
Move public tx listing API to host DB query (#1900)
Browse files Browse the repository at this point in the history
* add new fetch transactions API to host interface 
* refactor tenscan API to call new host interface
* remove redundant enclave client API
  • Loading branch information
badgersrus authored May 8, 2024
1 parent 73710d5 commit 3eb620f
Show file tree
Hide file tree
Showing 21 changed files with 1,502 additions and 1,582 deletions.
2 changes: 1 addition & 1 deletion design/host/host_db_requirements.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ but on mainnet this won't be possible, so we need to store the `tx_count` in thi
`ExtBatch.TxHashes` and expose a new Enclave API to retrieve this.

```sql
create table if not exists transactions_host
create table if not exists transaction_host
(
hash binary(32) primary key,
b_sequence int REFERENCES batch_host
Expand Down
3 changes: 0 additions & 3 deletions go/common/enclave.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,6 @@ type EnclaveScan interface {
// GetCustomQuery returns the data of a custom query
GetCustomQuery(ctx context.Context, encryptedParams EncryptedParamsGetStorageAt) (*responses.PrivateQueryResponse, SystemError)

// GetPublicTransactionData returns a list of public transaction data
GetPublicTransactionData(ctx context.Context, pagination *QueryPagination) (*TransactionListingResponse, SystemError)

// EnclavePublicConfig returns network data that is known to the enclave but can be shared publicly
EnclavePublicConfig(context.Context) (*EnclavePublicConfig, SystemError)
}
Expand Down
Loading

0 comments on commit 3eb620f

Please sign in to comment.