Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tudor-malene committed Jun 14, 2024
1 parent e925ec0 commit ca24577
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
run: go test --failfast -v ./... -count=1 -timeout 5m

- name: Store simulation logs
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: failure()
with:
name: ci-logs
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/manual-deploy-testnet-l2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ jobs:
done
- name: 'Upload L1 deployer container logs'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: deploy-l1-artifacts
path: |
Expand Down Expand Up @@ -312,7 +312,7 @@ jobs:
docker logs `docker ps -aqf "name=hh-l2-deployer"` > deploy-l2-contracts.out 2>&1
- name: 'Upload L2 deployer container logs'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: deploy-l2-artifacts
path: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/manual-recover-network-funds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
docker logs `docker ps -aqf "name=recover-funds"` > recover-funds.out 2>&1
- name: 'Upload container logs on failure'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: failure()
with:
name: recover-funds
Expand Down
20 changes: 10 additions & 10 deletions go/enclave/storage/enclavedb/events.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ func FilterLogs(
func DebugGetLogs(ctx context.Context, db *sql.DB, txHash common.TxHash) ([]*tracers.DebugLogs, error) {
var queryParams []any

query := "select rel_address1, rel_address2, rel_address3, rel_address4, lifecycle_event, topic0, topic1, topic2, topic3, topic4, datablob, b.hash, b.height, tx.hash, tx.idx, log_idx, c.address " +
query := "select eoa1.address, eoa2.address, eoa3.address, et.lifecycle_event, et.event_sig, t1.topic, t2.topic, t3.topic, datablob, b.hash, b.height, tx.hash, tx.idx, log_idx, c.address " +
baseEventsJoin +
" AND tx.hash = ? "

Expand All @@ -165,15 +165,14 @@ func DebugGetLogs(ctx context.Context, db *sql.DB, txHash common.TxHash) ([]*tra
LifecycleEvent: false,
}

var t0, t1, t2, t3, t4 sql.NullString
var relAddress1, relAddress2, relAddress3, relAddress4 []byte
var t0, t1, t2, t3 sql.NullString
var relAddress1, relAddress2, relAddress3 []byte
err = rows.Scan(
&relAddress1,
&relAddress2,
&relAddress3,
&relAddress4,
&l.LifecycleEvent,
&t0, &t1, &t2, &t3, &t4,
&t0, &t1, &t2, &t3,
&l.Data,
&l.BlockHash,
&l.BlockNumber,
Expand All @@ -186,7 +185,7 @@ func DebugGetLogs(ctx context.Context, db *sql.DB, txHash common.TxHash) ([]*tra
return nil, fmt.Errorf("could not load log entry from db: %w", err)
}

for _, topic := range []sql.NullString{t0, t1, t2, t3, t4} {
for _, topic := range []sql.NullString{t0, t1, t2, t3} {
if topic.Valid {
l.Topics = append(l.Topics, stringToHash(topic))
}
Expand All @@ -195,7 +194,6 @@ func DebugGetLogs(ctx context.Context, db *sql.DB, txHash common.TxHash) ([]*tra
l.RelAddress1 = bytesToAddress(relAddress1)
l.RelAddress2 = bytesToAddress(relAddress2)
l.RelAddress3 = bytesToAddress(relAddress3)
l.RelAddress4 = bytesToAddress(relAddress4)

result = append(result, &l)
}
Expand Down Expand Up @@ -247,17 +245,19 @@ func loadLogs(ctx context.Context, db *sql.DB, requestingAccount *gethcommon.Add

for rows.Next() {
l := types.Log{
Topics: make([]gethcommon.Hash, 4),
Topics: make([]gethcommon.Hash, 0),
}
var t0, t1, t2, t3 []byte
err = rows.Scan(&t0, &t1, &t2, &t3, &l.Data, &l.BlockHash, &l.BlockNumber, &l.TxHash, &l.TxIndex, &l.Index, &l.Address)
if err != nil {
return nil, fmt.Errorf("could not load log entry from db: %w", err)
}

for i, topic := range [][]byte{t0, t1, t2, t3} {
for _, topic := range [][]byte{t0, t1, t2, t3} {
if len(topic) > 0 {
l.Topics[i] = byteArrayToHash(topic)
l.Topics = append(l.Topics, byteArrayToHash(topic))
} else {
l.Topics = append(l.Topics, gethcommon.Hash{})
}
}

Expand Down

0 comments on commit ca24577

Please sign in to comment.