Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

base_fee_no_hooks doesn't include any fees other than Hook fees.(Version: [2024.9.11-release+985]) #369

Open
tequdev opened this issue Sep 28, 2024 · 1 comment

Comments

@tequdev
Copy link
Collaborator

tequdev commented Sep 28, 2024

Issue Description

The base_fee_no_hooks field included in the return value of the fee command does not include fees other than Hooks fees, such as dynamic fees for Memo fields.

drops[jss::base_fee_no_hooks] = to_string(view->fees().base);

This is an issue that is not urgent, but I will keep a note of it.

Steps to Reproduce

import { Client, encode } from '@transia/xrpl'

const client = new Client('wss://xahau.org')

const main = async () => {
  await client.connect()

  const tx_json = {
    TransactionType: 'AccountSet',
    Account: 'rQQQrUdN1cLdNmxH4dHfKgmX5P4kf3ZrM',
    Fee: '0',
    SigningPubKey: '',
    Sequence: 0,
    Memos: [{ Memo: { MemoType: '0101', MemoData: '10000000000000000000000000000000000000' } }],
  }

  const tx_blob = encode(tx_json)

  const response = await client.request({
    command: 'fee',
    tx_blob,
  })
  console.log(response.result)
  await client.disconnect()
}
main()

result

{
  current_ledger_size: '13',
  current_queue_size: '0',
  drops: {
    base_fee: '31',
    base_fee_no_hooks: '10',
    median_fee: '15500',
    minimum_fee: '31',
    open_ledger_fee: '31'
  },
  expected_ledger_size: '330',
  fee_hooks_feeunits: '31',
  ledger_current_index: 8807447,
  levels: {
    median_level: '128000',
    minimum_level: '256',
    open_ledger_level: '256',
    reference_level: '256'
  },
  max_queue_size: '6600'
}

Expected Result

It includes all fees other than Hooks execution fees.

base_fee_no_hooks: '31',

Actual Result

base_fee_no_hooks: '10',

Environment

Version: 2024.9.11-release+985

Supporting Files

@dangell7
Copy link
Collaborator

Its improperly named I agree. The problem is, we cannot switch the field or every current client will break.

base_fee is the base + hooks + memos + hook parameters
base_fee_no_hooks is just the base

We can rename it if you'd like

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants