Skip to content

Commit

Permalink
tracing fixes plus one NOP
Browse files Browse the repository at this point in the history
  • Loading branch information
Scooletz committed Jan 9, 2025
1 parent c3f9dd3 commit 532a212
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 14 deletions.
4 changes: 3 additions & 1 deletion src/Nethermind/Nethermind.Evm/EvmStack.cs
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,9 @@ private readonly void Trace(int depth)
{
for (int i = depth; i > 0; i--)
{
_tracer.ReportStackPush(Unsafe.As<Word, UInt256>(ref _words[Head - i]));
Word trace = _words[Head - i];
Reshuffle(ref trace);
_tracer.ReportStackPush(MemoryMarshal.CreateSpan(ref Unsafe.As<Word, byte>(ref trace), WordSize));
}
}
}
Expand Down
12 changes: 0 additions & 12 deletions src/Nethermind/Nethermind.Evm/Tracing/ITxTracer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -218,18 +218,6 @@ public interface ITxTracer : IWorldStateTracer, IDisposable
/// <remarks>Depends on <see cref="IsTracingInstructions"/></remarks>
void ReportStackPush(in ReadOnlySpan<byte> stackItem);

/// <summary>
///
/// </summary>
/// <param name="value"></param>
void ReportStackPush(in UInt256 value)
{
if (BitConverter.IsLittleEndian)
{
// The platform is little endian, requires conversion.
}
}

/// <summary>
/// </summary>
/// <param name="stackItem"></param>
Expand Down
3 changes: 2 additions & 1 deletion src/Nethermind/Nethermind.Evm/VirtualMachine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -784,7 +784,8 @@ private CallResult ExecuteCode<TTracingInstructions, TTracingRefunds, TTracingSt
if (IsNullRef(ref byRef)) goto StackUnderflow;
if (byRef.IsZero)
{
byRef = default;
// NOP
// byRef = default;
}
else
{
Expand Down

0 comments on commit 532a212

Please sign in to comment.