-
Notifications
You must be signed in to change notification settings - Fork 375
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
fix: remove empty timestamp from the tx signature payload #1939
fix: remove empty timestamp from the tx signature payload #1939
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1939 +/- ##
==========================================
+ Coverage 46.64% 46.67% +0.02%
==========================================
Files 492 492
Lines 69624 69657 +33
==========================================
+ Hits 32476 32510 +34
+ Misses 34442 34435 -7
- Partials 2706 2712 +6 ☔ View full report in Codecov by Sentry. |
Hi @zivkovicmilos . Thanks for the head's up. Gno Native Kit relies on gnoclient to sign. Is this signing code affected by this PR? |
If you're using the provided Go signing methods (from the repo) there is no action needed on your part -- a change is required only for non-Go clients (JS / TS, Rust...). The signing code you've linked is already good to go (I've updated the gnoclient signer in this PR) 👌 |
@jinoosss @dongwon8247 |
I believed that having this field could be beneficial. If initializing an empty time field is complex, why not make it nullable? Are there any examples of using this field where it's not empty? |
@zivkovicmilos |
The transaction timestamp can never be set with the current way the transactions are structured and parsed -- they don't have a timestamp field like in Ethereum (which doesn't go into the signature bytes). Ethereum transactions signatures are just signed RLP encodings (Ethereum encoding standard) of the following data points: Making the field nullable now introduces another logic block, where the node would need to reconstruct 2 tx signature bytes (one with an empty timestamp, the other without a timestamp) to verify that a signature is valid / invalid (and one of these will always be invalid). This signature bytes moment needs to be deterministic and simple on both the client (generating the sig) and the node (verifying the sig), to avoid overhead |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
from the review meeting: good to go 👍
## Description This PR updates the `gno` and `faucet` versions for the `gnofaucet` to utilize the latest ones, that incorporate breaking changes recently merged to `master`. related: #1939 <details><summary>Contributors' checklist...</summary> - [x] Added new tests, or not needed, or not feasible - [x] Provided an example (e.g. screenshot) to aid review or the PR is self-explanatory - [x] Updated the official documentation or not needed - [x] No breaking changes were made, or a `BREAKING CHANGE: xxx` message was included in the description - [x] Added references to related issues and PRs - [ ] Provided any useful hints for running manual tests - [ ] Added new benchmarks to [generated graphs](https://gnoland.github.io/benchmarks), if any. More info [here](https://github.com/gnolang/gno/blob/master/.benchmarks/README.md). </details>
This PR updates the version of Gno. Now gnonative uses the latest Goclient version to support the new signature system: gnolang/gno#1939 The PR also adds a new ErrCode used by the API method `SetRemote` because the new GnoClient can now return an error. This PR adds a GitHub Action workflow to automate the push on the Buf registry. I also asked someone to add the repo secret `BUF_TOKEN`. PR tested on Gnoboard with local gnodev. --------- Signed-off-by: D4ryl00 <d4ryl00@gmail.com>
…2019) This PR changes the MemFile and MemPackage to use `snake_case` fields for their JSON key names. This matches what all other objects in transactions do. A new test ensures that no transaction objects within the VM keeper have uppercase runes within their exported json fields. **BREAKING CHANGE:** old `m_addpkg` and `m_run` transactions will stop working. Clients will need to update accordingly, and this change needs to be synced like #1939. cc/ @zivkovicmilos @gnolang/berty @gnolang/onbloc --------- Co-authored-by: Miloš Živković <milos.zivkovic@tendermint.com>
…nolang#2019) This PR changes the MemFile and MemPackage to use `snake_case` fields for their JSON key names. This matches what all other objects in transactions do. A new test ensures that no transaction objects within the VM keeper have uppercase runes within their exported json fields. **BREAKING CHANGE:** old `m_addpkg` and `m_run` transactions will stop working. Clients will need to update accordingly, and this change needs to be synced like gnolang#1939. cc/ @zivkovicmilos @gnolang/berty @gnolang/onbloc --------- Co-authored-by: Miloš Živković <milos.zivkovic@tendermint.com>
Description
This PR closes #810
I've dropped the unused
Timestamp
field from theSignDoc
, which forced all clients that generate tx signatures outside of thegno
repo to initialize it to an empty UTC timestamp value (ex. Adena,tm2-js-client
...)BREAKING CHANGE: all clients that generate transaction signatures without using the provided Go methods in this repository need to update their source code to remove the
Timestamp
field. (@dongwon8247 @jefft0)I've also provided error handling for generating these signature bytes, which weren't present before.
Contributors' checklist...
BREAKING CHANGE: xxx
message was included in the description