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

Add traces support #66

Closed
jleni opened this issue Sep 27, 2020 · 4 comments · Fixed by #73 or #81
Closed

Add traces support #66

jleni opened this issue Sep 27, 2020 · 4 comments · Fixed by #73 or #81
Assignees

Comments

@jleni
Copy link
Member

jleni commented Sep 27, 2020

No description provided.

@raynaudoe
Copy link
Collaborator

We should re-check the list of supported operations after being able to query all traces from Lotus api.
Maybe only a subset will be enough ?

Current supported ops:

        "Send":             true, //Common
	"AwardBlockReward": true, //MethodsReward
	"ThisEpochReward":  true, //MethodsReward
	"SwapSigner":       true, //MethodsMultisig
	"LockBalance":      true, //MethodsMultisig
	"AddBalance":       true, //MethodsMarket
	"WithdrawBalance":  true, //MethodsMarket

@qiwu7
Copy link

qiwu7 commented Sep 29, 2020

Question about the supported operations. Can we add some comments/clarifications on what these methods are?

  • AwardBlockReward. Is this the block reward to miner?
  • ThisEpochReward, what’s difference between this and AwardBlockReward
  • LockBalance, is this unlocking funds or locking funds?
  • Send, does this include a multisig send/transfer? Maybe we rename this to Payment or Transfer? Since the operation is actually a positive amount on the receiver and negative amount on the sender. It looks wired if this is a SEND with negative amount on that operation. So might be better if we name it a payment/transfer op
  • What does the AddBalance and WithdrawBalance for the market means? I don’t think really pertains to us right but it would be great to add some more comments 🙂
  • FEE, is this missing? I don’t see a fee operation in the list
  • Vesting, is also missing? How are we tracking the fund unlock from the msig at each epoch?

@arajasek
Copy link

arajasek commented Oct 3, 2020

AwardBlockReward. Is this the block reward to miner?

Yes. Note it will be called multiple times per epoch, once for each miner who won a block in that tipset (or 0 times for a null epoch).

ThisEpochReward, what’s difference between this and AwardBlockReward

This is used to calculate the block reward for the next epoch. You probably don't care about it (the block reward is dynamically re-calculated every epoch).

LockBalance, is this unlocking funds or locking funds?

It locks funds in a multisig.

Send, does this include a multisig send/transfer? Maybe we rename this to Payment or Transfer? Since the operation is actually a positive amount on the receiver and negative amount on the sender. It looks wired if this is a SEND with negative amount on that operation. So might be better if we name it a payment/transfer op

IIUC, yes, it includes any internal message invoked (including a multisig transfer, that would be invoked by an external MsigPropose / MsigApprove).

What does the AddBalance and WithdrawBalance for the market means? I don’t think really pertains to us right but it would be great to add some more comments

The market actor keeps a balance table in which actors can register themselves and submit some balance. This balance is then used as collateral for deals. Add and Withdraw modify the balance table as their names suggest. Probably not relevant to you, yeah.

FEE, is this missing? I don’t see a fee operation in the list

I don't understand the question. A message's gas used is stored in the receipt, and a complete accounting of the cost of a message can be found using StateMsgGasCost.

Vesting, is also missing? How are we tracking the fund unlock from the msig at each epoch?

There's no trace-able activity that happens to unlock funds every epoch (that would be a lot of state changes, so it just happens implicitly -- I can tell you the unlocked funds at any point in time based on the linear vesting schedule).

If you really wanted to know how much was unlocked every epoch, call MsigGetAvailableBalance before and after the epoch, and factor out any balance changes in the trace (any sends to/from the msig).

@qiwu7
Copy link

qiwu7 commented Oct 6, 2020

Thanks! @arajasek

FEE, is this missing? I don’t see a fee operation in the list

I don't understand the question. A message's gas used is stored in the receipt, and a complete accounting of the cost of a message can be found using StateMsgGasCost.

@raynaudoe let's make sure we use StateMsgGasCost to expose fee associated with each message

@jleni jleni linked a pull request Oct 6, 2020 that will close this issue
@raynaudoe raynaudoe mentioned this issue Oct 8, 2020
@jleni jleni closed this as completed in #81 Oct 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants