Skip to content

Commit af85f49

Browse files
committed
evmmax: Add naive evmmax tracing log
1 parent e998ad3 commit af85f49

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

include/evmmax/evmmax.hpp

+2
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@ class EVMMAXState
7272
/// Size (expressed in multiples of 8 bytes) needed to represent modulus.
7373
[[nodiscard]] size_t active_mod_value_size_multiplier() const noexcept;
7474

75+
void print_state(std::ostream& out) const noexcept;
76+
7577
void clear() noexcept;
7678

7779
EVMMAXState& operator=(EVMMAXState&&) noexcept;

lib/evmmax/evmmax.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ struct EXMMAXModState : public EXMMAXModStateInterface
208208
}
209209
out << "}\n";
210210
}
211-
211+
212212
[[nodiscard]] size_t num_values() const noexcept override { return values.size(); }
213213
[[nodiscard]] size_t value_size_multiplier() const noexcept override { return value_size_mult; }
214214
};

lib/evmone/tracing.cpp

+7
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,13 @@ class InstructionTracer : public Tracer
124124
m_out << R"(,"refund":)" << std::dec << state.gas_refund;
125125
m_out << R"(,"opName":")" << get_name(opcode) << '"';
126126

127+
// if (state.evmmax_state.is_activated())
128+
// {
129+
// m_out << R"(,"evmmax":")" << std::endl;
130+
// m_out << "";
131+
// state.evmmax_state.print_state(m_out);
132+
// }
133+
127134
m_out << "}\n";
128135
}
129136

0 commit comments

Comments
 (0)