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

Fee Account Muxed displays Muxed Source Account #263

Open
sydneynotthecity opened this issue Jul 8, 2024 · 0 comments
Open

Fee Account Muxed displays Muxed Source Account #263

sydneynotthecity opened this issue Jul 8, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@sydneynotthecity
Copy link
Contributor

What did you do?

The fee_account_muxed field displays the source account address when the source account is muxed, but does not display the muxed fee account accurately when that account is muxed.

What did you expect to see?

For transaction hash 17fee99b64f9c34ec9f8b52ffd4a72c51186bdf36f79a92bbbc138603916039c , the fee account should be muxed. Horizon response:

"id": "17fee99b64f9c34ec9f8b52ffd4a72c51186bdf36f79a92bbbc138603916039c",
  "paging_token": "155461516714868736",
  "successful": true,
  "hash": "17fee99b64f9c34ec9f8b52ffd4a72c51186bdf36f79a92bbbc138603916039c",
  "ledger": 36196205,
  "created_at": "2021-07-03T17:53:56Z",
  "source_account": "GCBUR4UQ6LR32LEM2O6FZY2O5ZEI5K3D3BMIHAOTQVN65235NTFUDLTT",
  "account_muxed": "MCBUR4UQ6LR32LEM2O6FZY2O5ZEI5K3D3BMIHAOTQVN65235NTFUCAAAAAAAAAAAAA4U2",
  "source_account_sequence": "155461439404900353",
  "fee_account": "GCBUR4UQ6LR32LEM2O6FZY2O5ZEI5K3D3BMIHAOTQVN65235NTFUDLTT",
  "fee_account_muxed": "MCBUR4UQ6LR32LEM2O6FZY2O5ZEI5K3D3BMIHAOTQVN65235NTFUCAAAAAAAAAAAAA4U2",

What did you see instead?

However Hubble returns a null fee_account_muxed:

select * 
from `crypto-stellar.crypto_stellar.history_transactions`
where transaction_hash = '17fee99b64f9c34ec9f8b52ffd4a72c51186bdf36f79a92bbbc138603916039c'
and batch_run_date >= '2021-07-01'
and batch_run_date < '2021-07-30'

Converse example in Hubble with an incorrectly populated fee account:

    "id": "225140055352963072",
    "transaction_hash": "a261c12d4d400c2954d1e234103907178f4f0767b69a868bf9cf0e2d27cb41a6",
    "ledger_sequence": "52419504",
    "account": "GA5ZPIVPAXEG5LMHTKF4PJZ52K5YFUUBSHL746TINKJ7GNMG4KYF3S4R",
    "successful": "true",
    "fee_charged": "200",
    "inner_transaction_hash": "00c0353e0494d4cbab31ac9fba3e83c82c3071fbb96bd69be40f012cc0cf8f3d",
    "fee_account": "GCUCLPMVO4Q4M32VCPDPQBYCRCTZDA4RYGXZCL7ZA3TOUFPM6ROQRDMI",
    "new_max_fee": "1200",
    "account_muxed": "MA5ZPIVPAXEG5LMHTKF4PJZ52K5YFUUBSHL746TINKJ7GNMG4KYF2AAACOBCKABHCTRYY",
    "fee_account_muxed": "GCUCLPMVO4Q4M32VCPDPQBYCRCTZDA4RYGXZCL7ZA3TOUFPM6ROQRDMI",

Root Cause:

stellar-etl is checking the source account type, but should check the FeeBumpAccount type instead:

if transaction.Envelope.IsFeeBump() {
		feeBumpAccount := transaction.Envelope.FeeBumpAccount()
		feeAccount := feeBumpAccount.ToAccountId()
		if sourceAccount.Type == xdr.CryptoKeyTypeKeyTypeMuxedEd25519 {
			feeAccountMuxed := feeAccount.Address()
			transformedTransaction.FeeAccountMuxed = feeAccountMuxed
		}
@sydneynotthecity sydneynotthecity added the bug Something isn't working label Jul 8, 2024
@stellar stellar deleted a comment Jul 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant