Skip to content

Conversation

@axic
Copy link
Member

@axic axic commented Jan 15, 2018

No description provided.

@axic
Copy link
Member Author

axic commented Jan 24, 2018

Depends on decision in ewasm/design#75

@axic axic changed the title EEI: charge for memory gas cost in useGas [WIP] EEI: charge for memory gas cost in useGas Jan 24, 2018
@axic axic force-pushed the memorygas branch 2 times, most recently from b9d8b07 to c4ba6a1 Compare March 12, 2018 00:17
takeGas(gas);

heraAssert((ffsl(gas) + ffsl(memory.size()) <= 64), "Memory gas calculation overflow."); //may need to find alternative to ffsl for cross-libc portability
takeGas(gas * memory.size() / GasSchedule::memoryPageSize * GasSchedule::memoryCostPerPage + 1); //round gas cost up
Copy link
Member

Choose a reason for hiding this comment

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

Unsure whether this should be rounded up or not.

Copy link
Member Author

Choose a reason for hiding this comment

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

Not sure. What are the pros/cons for each?

@jakelang
Copy link
Member

rebased

@jakelang jakelang added the blocked by spec ⚠️ Depends on design decision label May 29, 2018
@axic axic marked this pull request as draft June 9, 2020 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

blocked by spec ⚠️ Depends on design decision in review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants