-
Notifications
You must be signed in to change notification settings - Fork 1k
Refactor SDK args and sigs #4816
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
Conversation
82edf81 to
cbac096
Compare
98315b4 to
3e56f75
Compare
| } | ||
| // NOTE: the disposable gas_payer is always overridden by | ||
| // signing inputs | ||
| } else if disposable_gas_payer { |
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.
Technically if a disposable gas payer is required no signer should be provided since it's not needed, grows the size of the tx (and the gas required) and might leak information. Still, I've maintained the same logic we've had in place for a while for the wrapper signer: if the user specifically passes a signing key we still produce a signature for that (i.e. the user is still in control even though we try to guide them)
🧪 CI InsightsHere's what we observed from your CI run for 3394fd7. ✅ Passed Jobs With Interesting Signals
|
| @@ -0,0 +1,2 @@ | |||
| - Reworked SDK wrapping and signatures. | |||
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.
if we do take this PR I think this should have a bit more details, especially about the breaking changes
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.
Made the message more specific in 35a691c
| use namada_core::voting_power::FractionalVotingPower; | ||
| use namada_ethereum_bridge::storage::bridge_pool::get_pending_key; | ||
| use namada_io::{Client, Io, display, display_line, edisplay_line}; | ||
| use namada_token::Amount; |
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.
unrelated to this pr but I'm wondering if we should perhaps drop all this eth bridge stuff
crates/sdk/src/tx.rs
Outdated
| .await?; | ||
|
|
||
| (SigningData::Inner(signing_data), None) | ||
| }; |
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.
look like this new block is the same in many tx types, maybe we can re-use it via some helper fn?
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.
Right, refactored in 4e33435
|
@tzemanovic I also fixed a bug for which we were attaching empty auth sections to the transactions (you can see it in de7eda5). That's what was making the e2e tests fail (unless something else comes up in this CI run) |
thx! I'm just merging #4832 which I think will introduce some conflicts if you don't mind rebasing this after |
|
Yes go ahead, I need to fix some more broken tests in the meantime |
35a691c to
685a151
Compare
782b04f to
a7623af
Compare
a7623af to
12dc976
Compare
|
@tzemanovic I think this is read for a final re-review. Mind that I changed the following:
|
ec0d850 to
73c9efd
Compare
|
I've just added a tiny commit to fix the CI changelog check |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Refactor SDK args and sigs (backport #4816)
…pr-4816 Refactor SDK args and sigs (backport #4816)
Describe your changes
Closes #3901 .
Closes #3883.
Reworks the sdk to address the followings:
dumpanddry-runargs by making the enum (inner or wrapper)SigningTxDataand move it to a newSigningWrapperDatawhich contains all the signing data for a batchaux_signing_dataMASPaddress as a tx owner. The owner should not be specified in these casesbuild_batchfunctionreveal_pk(no signature is needed for this transaction)Checklist before merging
breaking::labelsnamada-docsreponamada-indexerornamada-masp-indexer, a corresponding PR is opened in that repo