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

feat: multisig: accept arbitrary public messages #1252

Merged
merged 12 commits into from
Apr 7, 2023
Merged

Conversation

vyzo
Copy link
Contributor

@vyzo vyzo commented Mar 20, 2023

@vyzo vyzo requested a review from raulk March 20, 2023 21:26
Copy link
Member

@raulk raulk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Let's use this opportunity to add a test here and in the account actor?

@vyzo
Copy link
Contributor Author

vyzo commented Mar 20, 2023

added tests.

Copy link
Member

@raulk raulk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, although should withhold from merging until FIP draft is merged.

actors/account/tests/account_actor_test.rs Outdated Show resolved Hide resolved
@raulk raulk requested review from anorth, arajasek and ZenGround0 March 20, 2023 22:15
@raulk
Copy link
Member

raulk commented Mar 20, 2023

Should link to the FIP PR from the description.

@vyzo
Copy link
Contributor Author

vyzo commented Mar 20, 2023

added link to fip, tending to clippy.

@vyzo vyzo changed the title feat: multisig: accept arbitrary messages feat: multisig/paych: accept arbitrary public messages Mar 20, 2023
@codecov-commenter
Copy link

codecov-commenter commented Mar 20, 2023

Codecov Report

Merging #1252 (d8023da) into master (bb01e4c) will decrease coverage by 0.09%.
The diff coverage is 100.00%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1252      +/-   ##
==========================================
- Coverage   90.70%   90.62%   -0.09%     
==========================================
  Files         133      133              
  Lines       26964    26969       +5     
==========================================
- Hits        24459    24441      -18     
- Misses       2505     2528      +23     
Impacted Files Coverage Δ
actors/multisig/src/lib.rs 94.13% <100.00%> (+0.07%) ⬆️

... and 5 files with indirect coverage changes

@@ -569,5 +585,6 @@ impl ActorCode for Actor {
ChangeNumApprovalsThreshold => change_num_approvals_threshold,
LockBalance => lock_balance,
UniversalReceiverHook => universal_receiver_hook,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could remove this, since the Universal Receiver Hook's method is in the exported FRC-42 range, so it gets covered by the fallback. But I'd rather keep this explicit branch for clarity. IMO, the account actor should do the same (which it doesn't).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: lets make the change to explicit handling of universal receiver hook to the account actor in this PR

@anorth
Copy link
Member

anorth commented Mar 21, 2023

should withhold from merging until FIP draft is merged

Please don't merge to master until FIP is approved. To reduce WIP, we can run an nv19 integration branch through. This may already be happening: let's discuss in Slack.

@vyzo vyzo changed the title feat: multisig/paych: accept arbitrary public messages feat: multisig: accept arbitrary public messages Mar 24, 2023
// this is arbitrary
let params = IpldBlock::serialize_cbor(&vec![1u8, 2u8, 3u8]).unwrap();

// accept >= 2<<24
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: the accept range is >= 2 ^24 (or >= 1 << 24)

@@ -569,5 +585,6 @@ impl ActorCode for Actor {
ChangeNumApprovalsThreshold => change_num_approvals_threshold,
LockBalance => lock_balance,
UniversalReceiverHook => universal_receiver_hook,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: lets make the change to explicit handling of universal receiver hook to the account actor in this PR

actors/multisig/src/lib.rs Show resolved Hide resolved
@ZenGround0 ZenGround0 enabled auto-merge April 7, 2023 21:17
@ZenGround0 ZenGround0 added this pull request to the merge queue Apr 7, 2023
Merged via the queue into master with commit 49db254 Apr 7, 2023
@ZenGround0 ZenGround0 deleted the feat/multisig-arb branch April 7, 2023 22:43
ZenGround0 added a commit that referenced this pull request Apr 17, 2023
* accept arbitrary messages in multisig

* accept arbitrary messages in paych

* add tests for fallback method handler in account, multisig, and paych

* rustfmt

* clippy

* moar clippy

* leave paych unmolested

* names....

* Review Response

* Update fallback to mutable runtime

* Clippy

---------

Co-authored-by: zenground0 <ZenGround0@users.noreply.github.com>
Co-authored-by: ZenGround0 <5515260+ZenGround0@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

6 participants