Skip to content

Commit

Permalink
Merge pull request #146 from FhenixProtocol/pd-sync-results
Browse files Browse the repository at this point in the history
Parallel decrypts: sync decryption results
  • Loading branch information
toml01 authored Sep 24, 2024
2 parents 0001764 + e167b94 commit 266d5c8
Show file tree
Hide file tree
Showing 9 changed files with 1,785 additions and 26 deletions.
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,11 @@ COPY nitro-overrides/precompiles/FheOps.go precompiles/FheOps.go
COPY nitro-overrides/precompiles/precompile.go precompiles/precompile.go
COPY nitro-overrides/arbos/block_processor.go arbos/block_processor.go
COPY nitro-overrides/arbos/parallel_tx_processor.go arbos/parallel_tx_processor.go
COPY nitro-overrides/arbos/parse_l2.go arbos/parse_l2.go
COPY nitro-overrides/gethhook/geth-hook.go gethhook/geth-hook.go
COPY nitro-overrides/execution/gethexec/sequencer.go execution/gethexec/sequencer.go
COPY nitro-overrides/execution/gethexec/tx_ops_graph.go execution/gethexec/tx_ops_graph.go
COPY nitro-overrides/execution/gethexec/executionengine.go execution/gethexec/executionengine.go

RUN go mod tidy

Expand Down
10 changes: 4 additions & 6 deletions nitro-overrides/arbos/block_processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,9 @@ type SequencingHooks struct {
ConditionalOptionsForTx []*arbitrum_types.ConditionalOptions

// Fhenix specific
NotifyCt func(*types.Transaction, *arbitrum_types.ConditionalOptions, *fheos.PendingDecryption)
NotifyDecryptRes func(*fheos.PendingDecryption) error
OnTxSuccess func(*types.Transaction)
NotifyCt func(*types.Transaction, *arbitrum_types.ConditionalOptions, *fheos.PendingDecryption)
NotifyDecryptRes func(*fheos.PendingDecryption) error
SerializeTxDecryptRes func(*types.Transaction) ([]byte, error)
}

func NoopSequencingHooks() *SequencingHooks {
Expand All @@ -143,7 +143,7 @@ func NoopSequencingHooks() *SequencingHooks {
nil,
func(*types.Transaction, *arbitrum_types.ConditionalOptions, *fheos.PendingDecryption) {},
func(*fheos.PendingDecryption) error { return nil },
func(*types.Transaction) {},
func(*types.Transaction) ([]byte, error) { return nil, nil },
}
}

Expand Down Expand Up @@ -403,8 +403,6 @@ func ProduceBlockAdvanced(
}
}
continue
} else {
hooks.OnTxSuccess(tx)
}

if tx.Type() == types.ArbitrumInternalTxType && result.Err != nil {
Expand Down
Loading

0 comments on commit 266d5c8

Please sign in to comment.