-
Notifications
You must be signed in to change notification settings - Fork 61
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
Include "nonce" as part of the event stream response #422
Comments
In addition, if we got the hex value of the response given by the function call like in blockchain api then it will be easier for us to deserializeCV. |
I'd be interested in hearing @lgalabru's thoughts on this as well, but here are my thoughts. From looking at the stacks network README documentation on what data is included in a But, the Since the nonce is not part of the payload, for Chainhook to get this data it would still need to make a request. This means the extra call would still be happening, but instead of it happening only when a user needs the data, it would always be happening. So I don't think it would be best to include the nonce directly in the payload. Let me know if I'm missing anything! |
I am not sure I understand the feedback. The nonce should already be part of the payloads being sent to predicates observers.
The value of this field is inaccurate? |
@lgalabru, we're stripping it out when serializing 🤦
I can get a fix out. |
ha good catch, thanks! |
@SushilBro, the blockchain API returns a transaction result like this: "tx_result": {
"hex": "0x070c0000000302647801000000000000000000000022ecb25c0002647901000000000000000000000129b96a4b9406737570706c790100000000000000000000011733124a14",
"repr": "(ok (tuple (dx u150000000000) (dy u1278716038036) (supply u1199152712212)))"
} Chainhook attempts to deserialize the hex result and just returns: "result": "(ok (tuple (dx u150000000000) (dy u1278716038036) (supply u1199152712212)))" and if it fails to deserialize, it just returns the raw result. Since we're already deserializing the transaction result, would you still need the hex so that you can deserialize it? |
Also, @SushilBro, I've made a new issue for this just so we can track them independently. Let's continue the conversation here: #431 |
As a user, I want to use "stx-address" along with the transaction's "nonce" as a combination to prove/confirm that something is complete. To do that, I am using Chainhook to observe transaction events and are expecting the "nonce" as part of the event-streams.
Using the Stacks Blockchain API to get the latest "nonce" via https://docs.hiro.so/api/get-the-latest-nonce-used-by-an-account is certainly an option; however, I could avoid an extra call.
Requested by: https://zeroauthority.xyz/
The text was updated successfully, but these errors were encountered: