anchor.diff:      {error, ttl_expired} = aetx:check(Q8, Trees, CurrHeight, ?PROTOCOL_VERSION),
       ok.
   
  +query_oracle_negative_dynamic_fee(Cfg) ->
  +    {OracleKey, S}  = register_oracle(Cfg, #{oracle_ttl => {block, 2000 + ?ORACLE_QUERY_HEIGHT}, fee => 25}),
  +    OracleId        = aec_id:create(oracle, OracleKey),
  +    {SenderKey, S2} = aeo_test_utils:setup_new_account(S),
  +    Trees           = aeo_test_utils:trees(S2),
  +    CurrHeight      = ?ORACLE_QUERY_HEIGHT,
  +
  +    F = fun(QTxOpts) -> aetx:check(aeo_test_utils:query_tx(SenderKey, OracleId, QTxOpts, S2), Trees, CurrHeight, ?PROTOCOL_VERSION) end,
  +    1 = MinFee = aec_governance:minimum_tx_fee(),
  +
  +    %% Test minimum fee for increasing TTL.
  +    ?assertEqual({error, too_low_fee}, F(#{query_ttl => {delta, 0}, fee => 0})),
  +    ?assertMatch({ok, _}             , F(#{query_ttl => {delta, 0}, fee => MinFee})),
  +    ?assertEqual({error, too_low_fee}, F(#{query_ttl => {delta, 1}, fee => MinFee})),
  +    ?assertMatch({ok, _}             , F(#{query_ttl => {delta, 1}, fee => 1 + MinFee})),
  +    ?assertMatch({ok, _}             , F(#{query_ttl => {delta, 999}, fee => 1 + MinFee})),
  +    ?assertMatch({ok, _}             , F(#{query_ttl => {delta, 1000}, fee => 1 + MinFee})),
  +    ?assertEqual({error, too_low_fee}, F(#{query_ttl => {delta, 1001}, fee => 1 + MinFee})),
  +    ?assertMatch({ok, _}             , F(#{query_ttl => {delta, 1001}, fee => 2 + MinFee})),
  +    %% Test more than minimum fee considering TTL.
  +    ?assertMatch({ok, _}             , F(#{query_ttl => {delta, 1001}, fee => 3 + MinFee})),
  +    ok.
  +
   query_oracle(Cfg) ->
  -    query_oracle(Cfg, #{}).
  -
  -query_oracle(Cfg, Opts) ->
  -    {OracleKey, S1} = register_oracle(Cfg),
  +    query_oracle(Cfg, #{}, #{}).
  +
  +query_oracle(Cfg, RegTxOpts, QueryTxOpts) ->
  +    {OracleKey, S1} = register_oracle(Cfg, RegTxOpts),
       {SenderKey, S2} = aeo_test_utils:setup_new_account(S1),
       Trees           = aeo_test_utils:trees(S2),
       CurrHeight      = ?ORACLE_QUERY_HEIGHT,
       PrivKey         = aeo_test_utils:priv_key(SenderKey, S2),
       OracleId        = aec_id:create(oracle, OracleKey),
   
  -    Q1 = aeo_test_utils:query_tx(SenderKey, OracleId, Opts, S2),
  +    Q1 = aeo_test_utils:query_tx(SenderKey, OracleId, QueryTxOpts, S2),
       %% Test that QueryTX is accepted
       SignedTx = aec_test_utils:sign_tx(Q1, PrivKey),
       {ok, [SignedTx], Trees2} =
  
positive.code:         aetx:check(RTx5, Trees, CurrHeight, ?PROTOCOL_VERSION),
      ok.
  
  query_response(Cfg) ->
      query_response(Cfg, #{}).
  
  query_response(Cfg, QueryOpts) ->
      {OracleKey, ID, S1} = query_oracle(Cfg, QueryOpts),
      Trees               = aeo_test_utils:trees(S1),
      CurrHeight          = ?ORACLE_RSP_HEIGHT,
  
  
negative.code: %% test case exports
  -export([ extend_oracle/1
          , extend_oracle_negative/1
          , extend_oracle_negative_dynamic_fee/1
          , prune_oracle/1
          , prune_oracle_extend/1
          , prune_query/1
  