-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
AMMCreate transaction missing Asset field in affected nodes (Version: 2.1.0) #4965
Comments
This is expected behavior. The metadata would omit fields that have default values. In this case, |
I disagree, as other objects do not omit default values in the metadata when they are created. |
The I am reaching out to XRPScan team to see if they agree to update. |
@Silkjaer Other objects do have default values that are omitted (like empty array), but they might be less obvious. I do agree with you that it would be more clear if XRP is not omitted. However, I don't think it would cause information loss, as the user could retrieve the AMM data in other ways. In the case of |
The purpose is not accessing the data, or figuring out a different way to do so, but it's about the expected behavior, such that e.g. tracking objects and their states can be done consistently regardless of type. I.e. I am scanning all objects, their states and their changes by monitoring affected nodes of all transactions storing it elsewhere. I have had to make an exception for this object type now. I have not come across other objects that have a non-empty default state for a property, which is not published in the Affected Nodes when the object is created. |
@shawnxie999 As a general rule, we want to discourage looking at the transaction payload as a source of truth. That's how we got things like the partial payment exploit. The metadata is the canonical truth about what happened during a transaction, so it should be accurate and complete enough that there is no need to look at the transaction payload. Now that I'm looking into this, a little background:
However, if you look at the
More importantly, XRP is not "nothing". I agree with @Silkjaer - This behavior is very clearly wrong. I propose that this needs to be fixed, either by:
My vote is for option 1. Either way, it'll need an amendment. |
@ximinez how would an amendment for changing the behavior of a |
@shawnxie999 We've done it a couple of times. Look for the Luckily, we just merged in a change to make a global This is absolutely transaction breaking. It doesn't (significantly) change the processing, but it does change what is stored in the node store. |
Thanks to the XRPScan project team for the quick fix. The amount2 field is now added to the XRPScan UI. See example: https://xrpscan.com/tx/3448E54EA7885B59CD4FFE85814F6EF3BDC500E9C4273895CA829D87D8CFEC1A |
Issue Description
When a new AMM is created, the created node in affected nodes miss the Asset field if it is XRP.
Steps to Reproduce
Example transaction: https://xrpscan.com/tx/BDCC35ED3EEA1F6E4AC76C21395F98239BACF9D59708CF3A4560830FF734AEF7
The text was updated successfully, but these errors were encountered: