Skip to content

Commit c446cb9

Browse files
committed
support pyspecs
1 parent be61b54 commit c446cb9

File tree

12 files changed

+20
-14
lines changed

12 files changed

+20
-14
lines changed

retesteth/Constants.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ const string c_withdrawalsRoot = "withdrawalsRoot";
5151
const string c_parentBeaconBlockRoot = "parentBeaconBlockRoot";
5252
const string c_excessBlobGas = "excessBlobGas";
5353
const string c_blobGasUsed = "blobGasUsed";
54+
const string c_requestsRoot = "requestsRoot";
5455
const string c_currentExcessBlobGas = "currentExcessBlobGas";
5556
const string c_parentExcessBlobGas = "parentExcessBlobGas";
5657
const string c_currentBlobGasUsed = "currentBlobGasUsed";

retesteth/Constants.h

+1
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ extern const std::string c_withdrawalsRoot;
4646
extern const std::string c_parentBeaconBlockRoot;
4747
extern const std::string c_excessBlobGas;
4848
extern const std::string c_blobGasUsed;
49+
extern const std::string c_requestsRoot;
4950
extern const std::string c_currentExcessBlobGas;
5051
extern const std::string c_currentBeaconRoot;
5152
extern const std::string c_parentExcessBlobGas;

retesteth/configs/clientconfigs/besu.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -289,9 +289,9 @@ if [ -z $wevm ]; then
289289
fi
290290
291291
if [ $1 = "t8n" ] || [ $1 = "b11r" ]; then
292-
besuevm $1 $2 $3 $4 $5 $6 $7 $8 $9 $10 $11 $12 $13 $14 $15 $16 $17 $18 $19 $20 $21 $22 $23 $24 $25 $26
292+
besuevm ${1} ${2} ${3} ${4} ${5} ${6} ${7} ${8} ${9} ${10} ${11} ${12} ${13} ${14} ${15} ${16} ${17} ${18} ${19} ${20} ${21} ${22} ${23} ${24} ${25} ${26}
293293
elif [ $1 = "t8n-server" ]; then
294-
besuevm $1 $2 $3 $4 $5 &
294+
besuevm ${1} ${2} ${3} ${4} ${5} &
295295
exit 0
296296
elif [ $1 = "-v" ]; then
297297
besuevm --version

retesteth/configs/clientconfigs/evmone.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ if [ -z $wevm ]; then
472472
fi
473473
474474
if [ $1 = "t8n" ] || [ $1 = "b11r" ]; then
475-
evmone-t8n $2 $3 $4 $5 $6 $7 $8 $9 $10 $11 $12 $13 $14 $15 $16 $17 $18 $19 $20 $21 $22 $23 $24 $25 $26
475+
evmone-t8n ${2} ${3} ${4} ${5} ${6} ${7} ${8} ${9} ${10} ${11} ${12} ${13} ${14} ${15} ${16} ${17} ${18} ${19} ${20} ${21} ${22} ${23} ${24} ${25} ${26}
476476
elif [ $1 = "-v" ]; then
477477
evmone-t8n -v
478478
elif [ $1 = "eof" ]; then

retesteth/configs/clientconfigs/nimbus.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ if [ -z $wevm ]; then
395395
fi
396396
397397
if [ $1 = "t8n" ] || [ $1 = "b11r" ]; then
398-
evm_nimbus $2 $3 $4 $5 $6 $7 $8 $9 $10 $11 $12 $13 $14 $15 $16 $17 $18 $19 $20 $21 $22 $23 $24 $25 $26
398+
evm_nimbus ${2} ${3} ${4} ${5} ${6} ${7} ${8} ${9} ${10} ${11} ${12} ${13} ${14} ${15} ${16} ${17} ${18} ${19} ${20} ${21} ${22} ${23} ${24} ${25} ${26}
399399
elif [ $1 = "-v" ]; then
400400
evm_nimbus --version
401401
else

retesteth/configs/clientconfigs/t8ntool.cpp

+6-6
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ if [ -z $wevm ]; then
3838
fi
3939
4040
if [ $1 = "eof" ] || [ $1 = "t8n" ] || [ $1 = "b11r" ]; then
41-
evm $1 $2 $3 $4 $5 $6 $7 $8 $9 $10 $11 $12 $13 $14 $15 $16 $17 $18 $19 $20 $21 $22 $23 $24 $25 $26
41+
evm ${1} ${2} ${3} ${4} ${5} ${6} ${7} ${8} ${9} ${10} ${11} ${12} ${13} ${14} ${15} ${16} ${17} ${18} ${19} ${20} ${21} ${22} ${23} ${24} ${25} ${26}
4242
elif [ $1 = "-v" ]; then
4343
evm -v
4444
else
@@ -514,8 +514,8 @@ then
514514
fi
515515
516516
cd $PYSPECS_PATH
517-
python3 -m venv ./venv/
518-
source ./venv/bin/activate
517+
#python3 -m venv ./venv/
518+
#source ./venv/bin/activate
519519
520520
SUITETYPE=$1
521521
SRCPATH=$2
@@ -562,11 +562,11 @@ if [ -d $testout ]; then
562562
rm -r $testout
563563
fi
564564
mkdir $testout
565-
1>&2 echo "fill -v $SRCPATH2 --output "$testout" "${ADDFLAGS[@]}" --evm-bin $EVMT8N --flat-output --from=$FROMF --until=$UNTIF"
565+
1>&2 echo "uv run fill -v $SRCPATH2 --output "$testout" "${ADDFLAGS[@]}" --evm-bin $EVMT8N --flat-output --from=$FROMF --until=$UNTIF"
566566
if [ $DEBUG != "null" ]; then
567-
1>&2 fill -v $SRCPATH2 --output "$testout" "${ADDFLAGS[@]}" --evm-bin $EVMT8N --flat-output --from=$FROMF --until=$UNTIF
567+
1>&2 uv run fill -v $SRCPATH2 --output "$testout" "${ADDFLAGS[@]}" --evm-bin $EVMT8N --flat-output --from=$FROMF --until=$UNTIF
568568
else
569-
out=$(fill -v $SRCPATH2 --output "$testout" "${ADDFLAGS[@]}" --evm-bin $EVMT8N --flat-output --from=$FROMF --until=$UNTIF 2>&1)
569+
out=$(uv run fill -v $SRCPATH2 --output "$testout" "${ADDFLAGS[@]}" --evm-bin $EVMT8N --flat-output --from=$FROMF --until=$UNTIF 2>&1)
570570
if [[ "$out" == *" failed"* ]] || [[ "$out" == *"ERROR"* ]]; then
571571
1>&2 echo "./retesteth/pyspecsStart.sh Pyspec test generation failed (use --verbosity PYSPEC for details) "
572572
exit 1

retesteth/helpers/TestHelper.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -384,6 +384,7 @@ string prepareSolidityVersionString()
384384
const string result = test::executeCmd(cmd, exitCode);
385385
const string cVersion = "Version";
386386
const string::size_type pos = result.rfind(cVersion);
387+
387388
if (pos != string::npos)
388389
{
389390
solcVersion = result.substr(pos, result.length());

retesteth/session/ToolBackend/ToolChainHelper.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ VALUE calculateGasLimit(VALUE const& _parentGasLimit, VALUE const& _parentGasUse
182182
// Also remove leading zeros in storage
183183
spState restoreFullState(DataObject& _toolState)
184184
{
185-
spDataObject fullState;
185+
spDataObject fullState = sDataObject(DataType::Object);
186186
for (auto& accTool2 : _toolState.getSubObjectsUnsafe())
187187
{
188188
DataObject& accTool = accTool2.getContent();

retesteth/session/ToolBackend/Verification.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -421,11 +421,13 @@ void verifyWithdrawalRecord(spWithdrawal const& _wtRecord)
421421

422422
int fake_exponential(int _factor, bigint _numerator, int _denominator)
423423
{
424+
volatile size_t safe = 0;
424425
int i = 1;
425426
bigint output = 0;
426427
bigint numerator_accum = _factor * _denominator;
427-
while (numerator_accum > 0)
428+
while (numerator_accum > 0 && safe < 1000)
428429
{
430+
safe = safe + 1;
429431
output += numerator_accum;
430432
numerator_accum = (numerator_accum * _numerator) / (_denominator * i);
431433
i += 1;

retesteth/testStructures/types/Ethereum/State.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ bool State::hasAccount(FH20 const& _address) const
5656

5757
spDataObject State::asDataObject() const
5858
{
59-
spDataObject data;
59+
spDataObject data = sDataObject(DataType::Object);
6060
for (auto const& [accKey, acc] : m_accounts)
6161
{
6262
(*data).atKeyPointer(accKey.asString()) = acc->asDataObject();

retesteth/testStructures/types/RPC/ToolResponse.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ ToolResponse::ToolResponse(DataObject const& _data)
2424
{c_excessBlobGas, {{DataType::String}, jsonField::Optional}},
2525
{c_currentExcessBlobGas, {{DataType::String}, jsonField::Optional}},
2626
{c_blobGasUsed, {{DataType::String, DataType::Null}, jsonField::Optional}},
27+
{c_requestsRoot, {{DataType::String, DataType::Null}, jsonField::Optional}},
2728
{"receipts", {{DataType::Array}, jsonField::Required}}});
2829

2930
m_stateRoot = sFH32(_data.atKey(c_stateRoot));

retesteth/unitTests/sszTests.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#include <retesteth/helpers/TestHelper.h>
55
#include <retesteth/helpers/TestOutputHelper.h>
66

7-
#if defined(UNITTESTS) || defined(__DEBUG__)
7+
#if defined(UNITTESTS)
88
#include <libssz/ssz.h>
99

1010

0 commit comments

Comments
 (0)