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

encode command ignores additional fields in xdr instead of failing #171

Open
sisuresh opened this issue Feb 7, 2024 · 0 comments
Open
Labels
bug Something isn't working

Comments

@sisuresh
Copy link
Contributor

sisuresh commented Feb 7, 2024

What version are you using?

stellar-xdr 20.1.0 (8b9d623ef40423a8462442b86997155f2c04d3a1)
xdr (+curr): b96148cd4acc372cc9af17b909ffe4b12c43ecb6
xdr (+next): 6a71b137bc49f901bed53c8c215c26213017026c

What did you do?

Ran stellar-xdr encode --type ConfigUpgradeSet xdr.json where xdr.json contained -

{
  "updated_entry": [
    {
      "contract_execution_lanes": {
        "ledger_max_tx_count": 100,
        "additional_setting_bad": 100
      }
    }
  ]
}

What did you expect to see?

Error message due to bad setting.

What did you see instead?

AAAAAQAAAAsAAABk (Which is the contract_execution_lanes xdr without additional_setting_bad).

This caused us some issues during the testnet reset because we added a new field to one of the settings and updated our JSON file, but my local stellar-xdr was out of date, so the encode command was just ignoring the new field instead of failing.

@sisuresh sisuresh added the bug Something isn't working label Feb 7, 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

2 participants
@sisuresh and others