Skip to content

Commit

Permalink
disable auth for now
Browse files Browse the repository at this point in the history
  • Loading branch information
hamdiallam committed Oct 23, 2024
1 parent 7eee0d1 commit eaf10d9
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
6 changes: 5 additions & 1 deletion op-txproxy/conditional_txs.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,11 @@ func (s *ConditionalTxService) SendRawTransactionConditional(ctx context.Context
authInfo := AuthFromContext(ctx)
if authInfo == nil {
s.failures.WithLabelValues("missing auth").Inc()
return common.Hash{}, missingAuthenticationErr

// See Issue: https://github.com/ethereum-optimism/infra/issues/68.
// We'll be re-enforcing authentcation when fixed
//return common.Hash{}, missingAuthenticationErr
authInfo = &AuthContext{}
}

// Handle the request. For now, we do nothing with the authenticated signer
Expand Down
13 changes: 10 additions & 3 deletions op-txproxy/conditional_txs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,16 @@ func TestSendRawTransactionConditionalDisabled(t *testing.T) {

func TestSendRawTransactionConditionalMissingAuth(t *testing.T) {
svc := setupSvc(t)
hash, err := svc.SendRawTransactionConditional(context.Background(), nil, types.TransactionConditional{})
require.Zero(t, hash)
require.Equal(t, missingAuthenticationErr, err)

tx := types.NewTransaction(0, predeploys.EntryPoint_v060Addr, big.NewInt(0), 0, big.NewInt(0), nil)
txBytes, err := rlp.EncodeToBytes(tx)
require.NoError(t, err)

// See Issue: https://github.com/ethereum-optimism/infra/issues/68.
// We'll be re-enforcing authentcation when fixed
hash, err := svc.SendRawTransactionConditional(context.Background(), txBytes, types.TransactionConditional{})
require.Equal(t, hash, tx.Hash())
require.Nil(t, err)
}

func TestSendRawTransactionConditionalInvalidTxTarget(t *testing.T) {
Expand Down

0 comments on commit eaf10d9

Please sign in to comment.