-
Notifications
You must be signed in to change notification settings - Fork 80
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
Implements datacap token actor #513
Conversation
3c4f9d6
to
3582f12
Compare
pub fn check_state_invariants<BS: Blockstore>( | ||
_state: &State, | ||
_store: &BS, | ||
) -> (StateSummary, MessageAccumulator) { |
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.
Maybe the token library can provide a generic state invariant check?
83a6b43
to
d07b601
Compare
@alexytsu I can't request review from you, but would appreciate you taking a look too |
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 the diff between master and integration were small I would have kept reviewing but the PCD change is now in this PR too. I'm going to update the integration branch first to ease review.
.github/workflows/ci.yml
Outdated
@@ -2,6 +2,9 @@ name: Continuous integration | |||
|
|||
on: | |||
push: | |||
branches: |
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.
Do we want to introduce commits from master to the integration branch like this? I would think we add these commits in separate PRs, or if we can avoid it not at all.
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.
Sorry, oversight. I should have rebased the integration branch and then this first
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.
LGTM overall, I'll be taking look at the Token library internals next
use fvm_shared::bigint::{bigint_ser, BigInt}; | ||
|
||
#[derive(Clone, Debug, PartialEq, Eq, Serialize_tuple, Deserialize_tuple)] | ||
pub struct AllowanceParams { |
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.
Have we considered moving the generalized token type parameters into the token library?
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.
Yes, they're not quite ready yet
pub mod testing; | ||
mod types; | ||
|
||
/// TODO: |
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.
Are we keeping these on the integration branch or trying to remove all TODOs each PR?
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.
Ok to keep a few on integration branch
Still some development going, I reckon wait til next week for that. |
d07b601
to
1014d9d
Compare
Build failure addressed by implementing the token library's Messaging trait in terms of the Runtime. It's a bit messy due to mismatches there, would be easier if the Runtime was moved closer to the real syscall API. |
1014d9d
to
e61e26e
Compare
Now pinned to a commit on |
fn actor_id(&self) -> ActorID { | ||
// The Runtime unhelpfully wraps caller in an ID, while the Messaging trait | ||
// is closer to the syscall interface. | ||
self.rt.message().caller().id().unwrap() |
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.
This should be self.rt.message().receiver().id().unwrap()
, it is the ID of this actor itself (used to populate receiver hooks for the from
field during minting)
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.
Thanks #519
Implements a standalone datacap fungible token actor, using the Helix fungible token actor library in development for filecoin-project/FIPs#407
Part of filecoin-project/FIPs#313. Not yet integrated with anything. I haven't written tests yet as we're merging to a development branch with priority on ensuring the end-to-end hookup is correct.
This is ready for review, with following caveats:
Closes #522