Skip to content

Commit

Permalink
Rename Ext gas cost tier to BlockHash
Browse files Browse the repository at this point in the history
  • Loading branch information
cameel committed Jan 9, 2024
1 parent 5e6d2a1 commit 443fb95
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
14 changes: 7 additions & 7 deletions libevmasm/GasMeter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -264,13 +264,13 @@ unsigned GasMeter::runGas(Instruction _instruction, langutil::EVMVersion _evmVer

switch (instructionInfo(_instruction, _evmVersion).gasPriceTier)
{
case Tier::Zero: return GasCosts::tier0Gas;
case Tier::Base: return GasCosts::tier1Gas;
case Tier::VeryLow: return GasCosts::tier2Gas;
case Tier::Low: return GasCosts::tier3Gas;
case Tier::Mid: return GasCosts::tier4Gas;
case Tier::High: return GasCosts::tier5Gas;
case Tier::Ext: return GasCosts::tier6Gas;
case Tier::Zero: return GasCosts::tier0Gas;
case Tier::Base: return GasCosts::tier1Gas;
case Tier::VeryLow: return GasCosts::tier2Gas;
case Tier::Low: return GasCosts::tier3Gas;
case Tier::Mid: return GasCosts::tier4Gas;
case Tier::High: return GasCosts::tier5Gas;
case Tier::BlockHash: return GasCosts::tier6Gas;

case Tier::Special:
case Tier::Invalid:
Expand Down
2 changes: 1 addition & 1 deletion libevmasm/Instruction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ static std::map<Instruction, InstructionInfo> const c_instructionInfo =
{ Instruction::RETURNDATASIZE, {"RETURNDATASIZE", 0, 0, 1, false, Tier::Base } },
{ Instruction::RETURNDATACOPY, {"RETURNDATACOPY", 0, 3, 0, true, Tier::VeryLow } },
{ Instruction::EXTCODEHASH, { "EXTCODEHASH", 0, 1, 1, false, Tier::Special } },
{ Instruction::BLOCKHASH, { "BLOCKHASH", 0, 1, 1, false, Tier::Ext } },
{ Instruction::BLOCKHASH, { "BLOCKHASH", 0, 1, 1, false, Tier::BlockHash } },
{ Instruction::COINBASE, { "COINBASE", 0, 0, 1, false, Tier::Base } },
{ Instruction::TIMESTAMP, { "TIMESTAMP", 0, 0, 1, false, Tier::Base } },
{ Instruction::NUMBER, { "NUMBER", 0, 0, 1, false, Tier::Base } },
Expand Down
2 changes: 1 addition & 1 deletion libevmasm/Instruction.h
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ enum class Tier
Low, // 5, Fast
Mid, // 8, Mid
High, // 10, Slow
Ext, // 20, Ext
BlockHash, // 20
Special, // multiparam or otherwise special
Invalid // Invalid.
};
Expand Down

0 comments on commit 443fb95

Please sign in to comment.