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

Improve StateMsg APIs #4429

Merged
merged 6 commits into from
Oct 16, 2020
Merged

Improve StateMsg APIs #4429

merged 6 commits into from
Oct 16, 2020

Conversation

arajasek
Copy link
Contributor

  • Adds GasCost to InvocResult
  • Renames StateReplay to StateTransplant, as suggested by @raulk
  • Moves StateMsgGasCost into the new StateReplay, which searches for the specified msg and replays it if found exactly as it was applied on chain

Copy link
Contributor

@Kubuxu Kubuxu left a comment

Choose a reason for hiding this comment

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

SGWM but it changes the API, removal of StateMsgGasCost and change to StateReplay

@@ -26,7 +26,7 @@ class Block extends React.Component {

messages = await Promise.all(messages.map(async (msg, i) => {
if (msg.receipt.ExitCode !== 0) {
let reply = await this.props.conn.call('Filecoin.StateReplay', [{Cids: [this.props.cid], Blocks: [header], Height: header.Height}, msg.Cid])
let reply = await this.props.conn.call('Filecoin.StateTransplant', [{Cids: [this.props.cid], Blocks: [header], Height: header.Height}, msg.Cid])
Copy link
Member

Choose a reason for hiding this comment

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

wrong

Copy link
Member

@whyrusleeping whyrusleeping left a comment

Choose a reason for hiding this comment

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

other than your horrible oversight in the most important part of the PR, this LGTM

@crossle
Copy link

crossle commented Oct 16, 2020

How about add tipset height for the state message? I need to know the message in which tipset and the message all cost, use the formula ((Gas Premium + Base Fee) * Gas Limit), or the RPC return the message all cost.

@arajasek arajasek merged commit 0775c6c into master Oct 16, 2020
@arajasek arajasek deleted the asr/state-apis branch October 16, 2020 04:51
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 this pull request may close these issues.

4 participants