Skip to content
This repository was archived by the owner on Jan 5, 2019. It is now read-only.

Do not charge gas for interface methods#265

Merged
lrettig merged 1 commit into
masterfrom
disable-interface-metering
May 27, 2018
Merged

Do not charge gas for interface methods#265
lrettig merged 1 commit into
masterfrom
disable-interface-metering

Conversation

@axic

@axic axic commented May 27, 2018

Copy link
Copy Markdown
Member

No description provided.

@lrettig lrettig mentioned this pull request May 27, 2018

@lrettig lrettig left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@lrettig lrettig merged commit 4bd4810 into master May 27, 2018
@lrettig lrettig deleted the disable-interface-metering branch May 27, 2018 21:20
Comment thread index.js
gasCount += op.fee
// do not charge gas for interface methods
// TODO: implement proper gas charging and enable this here
if (opint < 0x30 || (opint > 0x45 && opint < 0xa0)) {

@cdetrio cdetrio May 28, 2018

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

would be better to have an explicit list of opcodes which translate to interface methods and opcodes that don't

@cdetrio cdetrio May 28, 2018

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

relevant doc is here ewasm/design#81

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yes, that is an option which came up (add a field to opcodes.js), but this was a quick and dirty way to progress.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants