Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DON'T MERGE] Update evmone to v0.13.0 #17

Open
wants to merge 596 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
596 commits
Select commit Hold shift + click to select a range
879d00c
ci: Upgrade spec tests (#848)
chfast Mar 26, 2024
cea6518
t8n: Load "parentBeaconBlockRoot" from env.json (#849)
chfast Mar 27, 2024
7225fad
ci: Drop Silkworm-driven blockchain-tests job (#850)
chfast Mar 27, 2024
528ecfb
Move EOF creation transition tests to separate file (#836)
gumb0 Mar 28, 2024
f853649
Remove empty file (#851)
gumb0 Mar 31, 2024
fd1c60a
Refactor evmone-precompiles-bench
chfast Apr 2, 2024
d2f077c
Provide more inputs to precompiles benchmarks
chfast Apr 2, 2024
c694ead
Add benchmarks for ecpairing precompile
chfast Apr 3, 2024
7f33062
Refactor evmone-precompiles-bench (#854)
chfast Apr 4, 2024
7ae5279
precompiles: Add native implementation of RIPEMD160
chfast Mar 22, 2024
6f51dcc
precompiles: Use crypto::ripemd160 for precompile 3
chfast Mar 25, 2024
f82140a
precompiles: Do not cache ripemd160
chfast Mar 25, 2024
cd1f3f6
Add native implementation of RIPEMD160 (#846)
chfast Apr 11, 2024
404c6f3
crypto: Implement BLAKE2b compress function F
chfast Apr 4, 2024
d46e3b9
precompiles: Add the BLAKE2bf precompile
chfast Apr 5, 2024
b2af042
precompiles: Do not cache the BLAKE2bf precompile
chfast Apr 5, 2024
0b648e3
Add native implementation of BLAKE2bf precompile (#857)
battlmonstr Apr 11, 2024
1f34fce
codecov: Drop flags config (#860)
chfast Apr 11, 2024
940b61a
test: Move bytecode and utils to evmone::test:: (#861)
chfast Apr 12, 2024
dffed13
precompiles: Move stubs to C++
chfast Mar 28, 2024
2f05dc8
precompiles: Remove cache layer and JSON stubs
chfast Mar 29, 2024
24a3214
Move precompiles' stubs from JSON to C++ (#853)
chfast Apr 12, 2024
be6cb06
EOFCREATE and RETURNCONTRACT implementations
gumb0 Mar 27, 2024
254a982
Forbid RETURN and STOP in EOFCREATE context
gumb0 Mar 4, 2024
46f04a9
Allow deploying EOF code from EOFCREATE
gumb0 Mar 13, 2024
2b192ef
Add tests for embedded container validation and for EOFCREATE execution
gumb0 Apr 12, 2024
1d824ed
Add EOFCREATE state transition tests
gumb0 Mar 26, 2024
1ff843f
Add EOFCREATE and RETURNCONTRACT instruction validation tests
gumb0 Mar 4, 2024
e42590b
Add embedded container tests for read_valid_eof1_header()
gumb0 Jan 23, 2024
b0528d6
Add test with calling a EOFCREATE-deployed contract and DATA* instruc…
gumb0 Mar 26, 2024
65437b6
Update state tests
gumb0 Apr 16, 2024
2656062
Increase stack allowance
gumb0 Mar 27, 2024
6e697e7
Add test for initcode-mode non-transitiveness
pdobacz Apr 2, 2024
d53b9e2
EOFCREATE and RETURNCONTRACT implementation (#553)
gumb0 Apr 16, 2024
21d7839
test: Drop the long-running RIPEMD160 unit test (#865)
chfast Apr 16, 2024
ed5562f
statetest: Run all tests from a JSON file (#863)
chfast Apr 17, 2024
fa061d7
evmmax: Clean up mul implementation (#864)
chfast Apr 17, 2024
da95cc2
bytecode: Use C++20 `requires` instead of `std::enable_if` (#870)
chfast Apr 18, 2024
82407d0
Implement TXCREATE instruction and initcode transactions support in Host
gumb0 Apr 18, 2024
df29811
TXCREATE state transition tests
gumb0 Apr 17, 2024
4ecd83a
Mark OP_TXCREATE as undefined in legacy
gumb0 Mar 4, 2024
6fe271d
Support TXCREATE transactions in state tests
gumb0 Apr 17, 2024
7232d31
Add transition tests for CREATE/CREATE2 in TXCREATE's initcode
gumb0 Mar 11, 2024
86cd00c
Add transition tests for TXCREATE called from wrong type of transaction
gumb0 Mar 11, 2024
1b2835f
Add test for initcode-mode non-transitiveness (TXCREATE)
pdobacz Apr 2, 2024
44a029d
EOF: TXCREATE instruction (#702)
gumb0 Apr 18, 2024
ad99657
Test case: initcode-mode not being EOF-validated (#855)
pdobacz Apr 19, 2024
9b3ee17
Export state tests with invalid txs (#858)
pdobacz Apr 19, 2024
1b2d6b5
ci: Migrate to macOS M1 only (#874)
chfast Apr 24, 2024
e8626d2
Disallow code sections unreachable from section 0
hugo-dc Apr 16, 2024
41cc722
Disallow code sections unreachable from section 0 (#866)
gumb0 Apr 26, 2024
adf870a
Add test for maximum levels of nested EOF containers
gumb0 Apr 22, 2024
d7662a7
Extract header validation into separate function
gumb0 Apr 19, 2024
244c6bd
Move EOF magic and version validation into validate_header
gumb0 Apr 19, 2024
4ed8823
Use only subcontainer data offset and size in instruction validation
gumb0 Apr 19, 2024
4059b13
Use iteration instead of recursion in validation of EOF subcontainers
gumb0 Apr 26, 2024
8e375c2
Simplify validate_eof1() function
gumb0 Apr 19, 2024
72a3d5a
Use name-qualified field initializers in EOF1Header construction
gumb0 Apr 22, 2024
34a26e8
Add test to check EOF validation before activation fork
gumb0 Apr 22, 2024
1aa5539
EOF subcontainer validation without recursion (#871)
gumb0 Apr 26, 2024
b6d9a11
eofparse: Return number of errors (#873)
chfast Apr 26, 2024
81decc8
precompiles: Shorten stub tables (#882)
chfast May 6, 2024
16a8a06
precompiles: Add more stubs for ecpairing (#883)
chfast May 6, 2024
962d2bb
ci: Separate execution-spec-tests job (#875)
chfast May 6, 2024
6483138
state: Refactor `Host::create()` (#881)
chfast May 6, 2024
5d3a547
state: Implement EIP-7610
chfast Feb 12, 2024
f538f9e
ci: Upgrade ethereum/tests to v13.3
chfast May 6, 2024
7e4397a
Implement EIP-7610 (non-empty storage create collision) and upgrade e…
chfast May 8, 2024
af17b74
ci: Sync EOF tests with ethereum/tests (#884)
chfast May 8, 2024
93e8150
Refactor returning accessed code sections from validate_instuctions()
gumb0 May 6, 2024
6ab1b54
Collect subcontainer references during instruction validation
gumb0 May 10, 2024
64cfef6
Refactor: move EOFCREATE truncated container check to level above
gumb0 May 10, 2024
d7d2936
Refactor: validate subcontainer headers in the end of validation
gumb0 May 10, 2024
dc1d74c
Refactor: don't validate header before enqueing container
gumb0 May 10, 2024
7ad882c
Refactor subcontainer validation (#888)
gumb0 May 14, 2024
864492f
Fix EOF initcode handling before EOF is enabled (#893)
chfast May 22, 2024
42a2ac7
advanced: Use StackTop, drop Stack class (#894)
chfast May 22, 2024
2d5d6dc
Upgrade EVMC with Osaka EVM revision (#897)
chfast May 23, 2024
14b5f74
clang-tidy: Convert "Checks" to YAML list (#901)
chfast May 24, 2024
50b8c50
Upgrade EVMC and use evmc::{bytes, bytes_view}
chfast May 23, 2024
184d3a6
tests: Disable MSVC x86 compiler warning C4789
chfast May 24, 2024
642ebda
Upgrade EVMC and use evmc::{bytes, bytes_view} (#899)
chfast May 24, 2024
7f65121
Move TXCREATE and InitcodeTransaction to Osaka (#889)
gumb0 May 24, 2024
633f696
EOF: Assert against overflow in header.data_offset (#891)
pdobacz May 24, 2024
63d6d3d
Fix exported error messages for invalid tx tests (#886)
pdobacz May 24, 2024
f44466e
Add helper converting opcodes to EVMC call kinds (#905)
chfast May 24, 2024
bf329a1
Add --version option to testing tools (#902)
miles170 May 27, 2024
41d6069
Remove opcode_helpers.h (#903)
chfast May 27, 2024
389bb63
test: Improve EXTCODEHASH test (#904)
chfast May 27, 2024
2a9d202
Add EOF examples in tests (#844)
pdobacz May 27, 2024
eef3fe1
ci: Split clang-tidy "build", use bigger machine (#908)
chfast May 28, 2024
1398e88
StackSpace: use std::aligned_alloc() (#907)
chfast May 28, 2024
9f81bfb
Remove redundant validation from EOF EVM unit tests
gumb0 May 29, 2024
a1e64f7
Remove redundant validation from EOF EVM unit tests (#911)
gumb0 May 29, 2024
3417de7
Allow EOF creation transactions (#878)
pdobacz May 31, 2024
c62ff84
CI: Update codecov upload (#910)
chfast Jun 4, 2024
8c3dd4f
CI: Switch lcov to gcovr (#912)
chfast Jun 4, 2024
df16c70
Make EXT*CALL ASE-ready (#915)
pdobacz Jun 4, 2024
ea3e7de
Recreate detailed evm tests for eof RETURNDATACOPY
pdobacz May 27, 2024
394fddc
Make RETURNDATACOPY pad in EOF
pdobacz May 28, 2024
f976b45
Make RETURNDATALOAD pad
pdobacz May 28, 2024
5a19003
EOF RETURNDATA* to pad on OOB read (#909)
pdobacz Jun 4, 2024
9d3addd
tidy: Avoid returning void (#913)
chfast Jun 4, 2024
cc19e6e
tidy: Avoid nested conditional operator (#914)
chfast Jun 4, 2024
602b8f9
precompiles: Fix unused input hash in bn254 (#917)
chfast Jun 4, 2024
8784545
tidy: Disable "readability-redundant-inline-specifier"
chfast May 23, 2024
ba812d0
state: Drop explicit default initialization
chfast May 23, 2024
678a08b
test: Add missing #include <algorithm>
chfast May 23, 2024
4c59085
ci: Upgrade compilers: GCC 14 and clang 18
chfast May 23, 2024
f84f801
CI: Upgrade compilers: GCC 14 and clang 18 (#898)
chfast Jun 4, 2024
97bbf26
tidy: Remove unused #includes (#919)
chfast Jun 5, 2024
189bbaf
test: Refactor state_transition post checks (#920)
chfast Jun 6, 2024
64d1db5
test: Introduce TestState and TestAccount (#811)
chfast Jun 6, 2024
0a4676d
Rename EOF1Header::can_init() to has_full_data()
gumb0 Jun 5, 2024
82d9ffe
eof: Disallow truncated data in toplevel containers
gumb0 Jun 5, 2024
d813e73
Remove redundant has_full_data() check from TXCREATE
gumb0 Jun 5, 2024
705409f
EOF: Disallow truncated data in toplevel containers (#921)
chfast Jun 6, 2024
a10d7ea
test: Dump LLVM profile data to separate files (#926)
chfast Jun 10, 2024
d95893c
CI: Execute EOF EEST (#925)
pdobacz Jun 10, 2024
759165a
test: Allow `"to": null` in JSON transaction (#927)
chfast Jun 10, 2024
36b9b4e
ci: Upgrade EEST EOF tests to eip7692@v1.0.3 (#928)
chfast Jun 11, 2024
209aee1
ci: Correctly disable codecov plugins (#929)
chfast Jun 11, 2024
85a89e5
ci: Run ethereum/tests without optimizations (-Og) (#931)
chfast Jun 19, 2024
7464c55
Add validation of subcontainer kinds
gumb0 Jun 24, 2024
1a6c7ac
Remove initcode mode runtime checks from RETURNCONTRACT, RETURN, STOP
gumb0 Apr 29, 2024
c3df715
Fix validation tests
gumb0 Apr 29, 2024
baf2db0
Check that container is initcontainer in creation transaction/TXCREATE
gumb0 Jun 4, 2024
b294d38
Fix tests that use initcode in toplevel container
gumb0 Jun 18, 2024
96700b5
Container kind validation tests
gumb0 Jun 4, 2024
843878f
Support container kind field in json EOF validation tests
gumb0 Jun 3, 2024
37ed902
Update tests
gumb0 Jun 19, 2024
b790bc7
EOF validation of subcontainer kinds (#876)
gumb0 Jun 24, 2024
17ec114
Support validating initcode containers in eofparse (#934)
gumb0 Jun 25, 2024
9be04a5
Fix `eoftest` to run all tests from a JSON file (#935)
pdobacz Jun 25, 2024
f1da081
precompiles: Copy SHA256 implementation from Silkworm
chfast Jun 8, 2024
ba49438
precompiles: Use SHA256 implementation instead of stub
chfast Jun 8, 2024
9a12e78
precompiles: Convert SHA256 implementation to C++
chfast Jun 9, 2024
317b8fb
precompiles: Improve SHA256 code quality
chfast Jun 10, 2024
5556303
precompiles: De-brand Silkworm SHA256
chfast Jun 11, 2024
c4218b3
precompiles: Use std::byte, drop "cpu ext" in SHA256
chfast Jun 11, 2024
66cb577
precompiles: Add basic SHA256 unit tests
chfast Jun 12, 2024
3cab4ca
precompiles: Add SHA256 implementation (#924)
chfast Jun 25, 2024
dbf8fb4
EOF: limit validated container size to MAX_INITCODE_SIZE (#930)
pdobacz Jun 26, 2024
449a1dc
Silence failing EOF EEST test (#937)
pdobacz Jun 27, 2024
cb6a50f
eof: Disallow unreferenced subcontainers
gumb0 Jun 6, 2024
df592fe
eof: Disallow EOFCREATE and RETURNCONTRACT referencing the same conta…
gumb0 Jun 6, 2024
c69e5ca
ci: Disable failing EEST/EOF tests
chfast Jun 28, 2024
f3222be
Disallow unreferenced subcontainers and subcontainers referenced by b…
chfast Jun 28, 2024
17d1900
eoftest: Support `"initcode": true`
gumb0 Jun 26, 2024
aa63844
tests: Produce initcode flag in exported EOF validation tests
gumb0 Jun 26, 2024
1835714
EOF validation tests runner: support initcode flag (#936)
chfast Jun 28, 2024
2fe3f8e
Extract `MAX_CODE_SIZE` constant (#940)
chfast Jul 1, 2024
a7aa2a9
ci: Upgrade ethereum/tests to v14.0 (#942)
chfast Jul 1, 2024
b4f36d5
eoftest: Add support for "containerKind" (#943)
chfast Jul 3, 2024
f3b5067
ci: Bump EOF `execution-spec-tests` to 1.0.5 (#944)
pdobacz Jul 3, 2024
b6d881b
baseline: Move execution to separate file
chfast Jul 4, 2024
3c0df6f
baseline: Temporary rename baseline.cpp → baseline_analysis.cpp
chfast Jul 4, 2024
27b3115
baseline: Move analysis to separate file
chfast Jul 4, 2024
a630196
baseline: Split analysis and execution implementations
chfast Jul 4, 2024
8e2e110
eof: Represent MAGIC as bytes_view (#947)
chfast Jul 4, 2024
70ca837
cmake,ci: Export JSON tests (#948)
chfast Jul 12, 2024
b7bee06
precompiles: Improve output buffer handling (#951)
chfast Jul 16, 2024
d02e518
Update tests to use eof_bytecode format (#950)
hugo-dc Jul 22, 2024
8707e2a
test: Rename `emptyMPTHash` → `EMPTY_MPT_HASH` (#955)
chfast Jul 22, 2024
ff3559a
ci: Upgrade EEST EOF tests to v1.0.7 (#956)
chfast Jul 22, 2024
26d5609
blockchaintest: Simplify genesis handling (#954)
chfast Jul 23, 2024
6a792b3
test: Improve out-of-buffer detection in EOF tests
chfast Jul 24, 2024
1d357c2
eof: Fix parsing header
chfast Jul 23, 2024
2ba35a0
Fix parsing EOF version in header (#957)
chfast Jul 24, 2024
bdb51e6
eof: Merge implementations of `compute_[create2|eofcreate]_address` (…
pdobacz Jul 25, 2024
4542e8c
ci: Upgrade EEST to v3.0.0
chfast Jul 25, 2024
9696fcf
Fix `validate_eof` flag for EOF creation txs (#960)
pdobacz Jul 29, 2024
ef33f49
Upgrade EVMC to v12.0.0 (#966)
chfast Aug 5, 2024
391bd64
Upgrade intx to v0.11.0 (#967)
chfast Aug 6, 2024
b2d0672
evmmax: Make ModArith header-only and constexpr (#964)
rodiazet Aug 7, 2024
c318ab4
test: Convert example tests to TestState API (#968)
chfast Aug 8, 2024
0ab7636
Update CHANGELOG for 0.12.0 release (#963)
rodiazet Aug 8, 2024
bf6c91d
evmone 0.12.0
chfast Aug 8, 2024
c58509a
ci: Update ethereum/tests EOF tests (#970)
chfast Aug 8, 2024
4094b81
test: Add tests for create collision with storage (#969)
chfast Aug 9, 2024
b1f68a3
ci: Drop MSVC 32-bit support (#973)
chfast Aug 15, 2024
85ded61
ci: Upgrade EEST EOF tests to v1.0.8 (#974)
chfast Aug 15, 2024
ce2a7f0
eof: fix multi-container-section case (#978)
pdobacz Aug 22, 2024
2d20cc6
ci: Upgrade ethereum/tests (#977)
chfast Aug 26, 2024
6caebac
cmake: Prepare blst dependency (#972)
chfast Aug 27, 2024
4633b78
ci: Upgrade ethereum/tests to v14.1 (#980)
chfast Sep 1, 2024
112147e
test: Remove unused evmmax::ModArith variables (#981)
chfast Sep 1, 2024
6974fd7
ci: Execute EEST for Prague (#983)
chfast Sep 3, 2024
f2901c8
cmake: Improve blst build on macOS (#986)
chfast Sep 5, 2024
57ff8dd
eof: Add missing `RJUMPV` undefined in legacy test (#987)
chfast Sep 5, 2024
08cd34f
state: Move `system_call()` to separate file
chfast Aug 19, 2024
87a8918
state: Refactor `system_call()`
chfast Aug 19, 2024
080a341
Refactor `system_call()` (#976)
chfast Sep 5, 2024
3f7a16e
Make ExecutionState's Memory movable type (#988)
chfast Sep 5, 2024
ec2fa02
precompiles: Add BLS precompiles IDs (#984)
rodiazet Sep 6, 2024
fdc48da
cmake: Upgrade intx to v0.12.0 (#985)
chfast Sep 6, 2024
07d2f7a
eof: Add trait since when an instruction is in EOF (#989)
chfast Sep 9, 2024
12766de
precompiles: Implement EIP-2537's `bls12_g1add` (#982)
rodiazet Sep 10, 2024
d20b099
Remove TXCREATE
gumb0 Sep 9, 2024
64037bb
Remove ExecutionState::get_tx_initcode_by_hash()
gumb0 Sep 9, 2024
814b8cc
Remove initcode transactions
gumb0 Sep 10, 2024
a79218c
Remove TXCREATE (#992)
gumb0 Sep 10, 2024
d6edf7a
EIP-2935: Serve historical block hashes from state
chfast Jul 22, 2024
645756f
ci: Enable EIP-2935 EEST tests
chfast Sep 10, 2024
652b4b1
EIP-2935: Serve historical block hashes from state (#953)
chfast Sep 10, 2024
ad04d4e
ci: Upgrade EEST pectra-devnet-3 to v1.5.0 (#997)
chfast Sep 11, 2024
35b7475
test: Ensure exported state tests have all fields (#993)
pdobacz Sep 11, 2024
07c8a0e
precompiles: Implement EIP-2537's `bls12_g1mul` (#994)
rodiazet Sep 11, 2024
00af48c
ci: Upgrade EEST EOF tests to v1.0.9 (#1001)
pdobacz Sep 11, 2024
7a46e72
Fix `ExecutionState::reset()` (#1004)
chfast Sep 12, 2024
e90ea11
baseline: Simplify EOF handling in code analysis API
chfast Jul 1, 2024
5b63165
baseline: Improve `CodeAnalysis` API
chfast Jul 7, 2024
6e2f5d9
eof: Serve EOF data section from CodeAnalysis
chfast Sep 12, 2024
1004496
baseline: Improve code analysis API (#941)
chfast Sep 12, 2024
39aec66
precompiles: Implement EIP-2537's `bls12_g2add` (#995)
rodiazet Sep 13, 2024
1358b17
precompiles: Implement EIP-2537's `bls12_g2mul` (#999)
rodiazet Sep 13, 2024
243efeb
baseline: VM-level execution states
chfast Sep 1, 2024
112ff3c
baseline: Hide execution state from public API
chfast Sep 9, 2024
fd1d149
baseline: VM-level execution states (#1005)
chfast Sep 13, 2024
01eca77
eof: Don't re-parse EOF header in `RETURNCONTRACT` (#1002)
chfast Sep 16, 2024
7e844c3
Refactor execute_message() to allow CALLs with recipient != code_address
gumb0 Sep 16, 2024
7406bac
Skip touching CALL recipient when it has value
gumb0 Sep 17, 2024
335d056
Refactor Host::execute_message() to allow CALLs with recipient != cod…
gumb0 Sep 17, 2024
d3de72d
precompiles: Implement BLS multi scalar multiplication (#1010)
rodiazet Sep 18, 2024
0453324
test: Add 2 tests for SELFDESTRUCT (#1017)
chfast Sep 18, 2024
7c6a3ce
Add requestsRoot to t8n output for Prague (#1018)
gumb0 Sep 18, 2024
f007e7c
precompilles: Implement mapping of field elements to `BLS12-381` curv…
rodiazet Sep 18, 2024
edfe00d
precompiles: Implement BLS pairing check (#1016)
rodiazet Sep 18, 2024
184a3ad
precompiles: Implement KZG proof verification
chfast Aug 13, 2024
8e69b0a
precompiles: Enable point_evaluation
chfast Aug 13, 2024
85e7ff7
precompiles: Add benchmark for point_evaluation
chfast Aug 16, 2024
4a3cb41
precompiles: Implement KZG proof verification (aka "point evaluation"…
chfast Sep 19, 2024
bae4933
Increment transaction sender's nonce before entering execution frame …
gumb0 Sep 20, 2024
9a31345
Update EOF EEST tests to eip7692@v1.1.0 (#1025)
hugo-dc Sep 20, 2024
eaecdd5
Update CHANGELOG for v0.13.0 (#1026)
chfast Sep 23, 2024
593cc95
test: Support chain_id in loading multi-transaction state tests (#1023)
gumb0 Sep 23, 2024
7961b60
evmone 0.13.0
chfast Sep 23, 2024
2090a0d
Add apply_discount_factor to gas_parameters
elmato Oct 28, 2024
9708155
Fix G_sset scaling
elmato Nov 13, 2024
032abf0
Use G_sset as the storage gas cost when adding a slot in v3
elmato Nov 14, 2024
2ec4205
Merge tag 'v0.13.0' into elmato/merge-v0.13.0
elmato Jan 10, 2025
1b81062
Fix unit tests
elmato Jan 15, 2025
5adb409
cicd: change builders package name in workflow
elmato Jan 15, 2025
ce55caf
Fix build-tests.sh
elmato Jan 15, 2025
e7cb014
Fix build-tests.sh
elmato Jan 15, 2025
f2769c4
Fix build-tests.sh
elmato Jan 15, 2025
9694cef
Merge remote-tracking branch 'origin/elmato/discount-factor' into elm…
elmato Jan 15, 2025
d3f104f
Fix unittests
elmato Jan 16, 2025
0e987e0
Use actions/upload-artifact@v4 in workflow
elmato Jan 16, 2025
412d514
Use actions/download-artifact@v4 in workflow
elmato Jan 16, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.10.0
current_version = 0.13.0
tag = True
sign_tags = True
tag_message = evmone {new_version}
Expand Down
3 changes: 3 additions & 0 deletions .cicd/defaults.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{

}
5 changes: 5 additions & 0 deletions .cicd/platforms.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"ubuntu22": {
"dockerfile": ".cicd/platforms/ubuntu22.Dockerfile"
}
}
9 changes: 9 additions & 0 deletions .cicd/platforms/ubuntu22.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM ubuntu:jammy
ENV TZ="America/New_York"
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get upgrade -y && \
apt-get install -y build-essential \
cmake \
gcc-11 \
g++-11 \
git
126 changes: 66 additions & 60 deletions .clang-tidy
Original file line number Diff line number Diff line change
@@ -1,66 +1,72 @@
FormatStyle: file
HeaderFilterRegex: 'lib/evmone/|test/state/'
WarningsAsErrors: '*'
Checks: >
bugprone-*,
-bugprone-assignment-in-if-condition,
-bugprone-easily-swappable-parameters,
-bugprone-implicit-widening-of-multiplication-result,
-bugprone-unchecked-optional-access,
cert-dcl21-cpp,
cert-dcl50-cpp,
cert-dcl58-cpp,
cert-env33-c,
cert-err33-c,
cert-err34-c,
cert-err52-cpp,
cert-err60-cpp,
cert-flp30-c,
cert-mem57-cpp,
cert-msc50-cpp,
cert-msc51-cpp,
cert-oop57-cpp,
cert-oop58-cpp,
clang-analyzer-*,
cppcoreguidelines-*,
-cppcoreguidelines-avoid-c-arrays,
-cppcoreguidelines-avoid-goto,
-cppcoreguidelines-avoid-magic-numbers,
-cppcoreguidelines-avoid-non-const-global-variables,
-cppcoreguidelines-macro-usage,
-cppcoreguidelines-no-malloc,
-cppcoreguidelines-non-private-member-variables-in-classes,
-cppcoreguidelines-owning-memory,
-cppcoreguidelines-pro-bounds-array-to-pointer-decay,
-cppcoreguidelines-pro-bounds-constant-array-index,
-cppcoreguidelines-pro-bounds-pointer-arithmetic,
-cppcoreguidelines-pro-type-reinterpret-cast,
-cppcoreguidelines-pro-type-static-cast-downcast,
-cppcoreguidelines-pro-type-union-access,
-cppcoreguidelines-pro-type-vararg,
-cppcoreguidelines-special-member-functions,
google-global-names-in-headers,
google-runtime-int,
hicpp-exception-baseclass,
hicpp-multiway-paths-covered,
hicpp-no-assembler,
misc-*,
-misc-non-private-member-variables-in-classes,
modernize-*,
-modernize-avoid-c-arrays,
-modernize-use-trailing-return-type,
performance-*,
portability-*,
readability-*,
-readability-braces-around-statements,
-readability-else-after-return,
-readability-function-cognitive-complexity,
-readability-function-size,
-readability-identifier-length,
-readability-magic-numbers,
-readability-named-parameter,
-readability-qualified-auto,
-readability-uppercase-literal-suffix,
Checks:
- "bugprone-*"
- "-bugprone-assignment-in-if-condition"
- "-bugprone-easily-swappable-parameters"
- "-bugprone-implicit-widening-of-multiplication-result"
- "-bugprone-unchecked-optional-access"
- "cert-dcl21-cpp"
- "cert-dcl50-cpp"
- "cert-dcl58-cpp"
- "cert-env33-c"
- "cert-err33-c"
- "cert-err34-c"
- "cert-err52-cpp"
- "cert-err60-cpp"
- "cert-flp30-c"
- "cert-mem57-cpp"
- "cert-msc50-cpp"
- "cert-msc51-cpp"
- "cert-oop57-cpp"
- "cert-oop58-cpp"
- "clang-analyzer-*"
- "cppcoreguidelines-*"
- "-cppcoreguidelines-avoid-c-arrays"
- "-cppcoreguidelines-avoid-const-or-ref-data-members"
- "-cppcoreguidelines-avoid-goto"
- "-cppcoreguidelines-avoid-magic-numbers"
- "-cppcoreguidelines-avoid-non-const-global-variables"
- "-cppcoreguidelines-macro-usage"
- "-cppcoreguidelines-no-malloc"
- "-cppcoreguidelines-non-private-member-variables-in-classes"
- "-cppcoreguidelines-owning-memory"
- "-cppcoreguidelines-pro-bounds-array-to-pointer-decay"
- "-cppcoreguidelines-pro-bounds-constant-array-index"
- "-cppcoreguidelines-pro-bounds-pointer-arithmetic"
- "-cppcoreguidelines-pro-type-reinterpret-cast"
- "-cppcoreguidelines-pro-type-static-cast-downcast"
- "-cppcoreguidelines-pro-type-union-access"
- "-cppcoreguidelines-pro-type-vararg"
- "-cppcoreguidelines-special-member-functions"
- "google-global-names-in-headers"
- "google-runtime-int"
- "hicpp-exception-baseclass"
- "hicpp-multiway-paths-covered"
- "hicpp-no-assembler"
- "misc-*"
- "-misc-include-cleaner"
- "-misc-non-private-member-variables-in-classes"
- "-misc-use-anonymous-namespace"
- "modernize-*"
- "-modernize-avoid-c-arrays"
- "-modernize-use-trailing-return-type"
- "performance-*"
- "-performance-enum-size"
- "portability-*"
- "readability-*"
- "-readability-braces-around-statements"
- "-readability-else-after-return"
- "-readability-function-cognitive-complexity"
- "-readability-function-size"
- "-readability-identifier-length"
- "-readability-magic-numbers"
- "-readability-named-parameter"
- "-readability-qualified-auto"
# TODO: Check if removing inline affects clang optimized builds.
- "-readability-redundant-inline-specifier"
- "-readability-uppercase-literal-suffix"

CheckOptions:
readability-identifier-naming.ClassCase: CamelCase
Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/build-tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/bash
set -eo pipefail

# print and run a command
function ee()
{
echo "$ $*"
eval "$@"
}

# debug code
echo "CC='${CC}'"
echo "CXX='${CXX}'"
ee cmake --version

# build
ee mkdir build
ee pushd build
ee cmake -DEVMONE_TESTING=ON -DBUILD_SHARED_LIBS=OFF ..
ee make -j "$(nproc)"

# pack
ee popd
ee 'tar -czf build.tar.gz build/bin/*'

echo "Done! - ${0##*/}"
53 changes: 53 additions & 0 deletions .github/workflows/evmone.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# EOS EVM evmone CI
This GitHub Actions workflow builds all emvone modules

### Index
1. [Triggers](#triggers)
1. [Inputs](#inputs)
1. [Steps](#steps)
1. [Outputs](#outputs)
1. [See Also](#see-also)

## Triggers
This GitHub action will run under the following circumstances:
1. When code is pushed.
1. Workflow dispatch event, a manual CI run, which can be triggered by the "Workflow Dispatch" button in the Actions tab of the GitHub repository, among other means.

## Inputs
The inputs for this GitHub action are:
1. `GITHUB_TOKEN` - a GitHub Actions intrinsic used to access the repository and other public resources.
1. `TRUSTEVM_CI_APP_ID` - the app ID of the `trustevm-ci-submodule-checkout` GitHub App.
1. `TRUSTEVM_CI_APP_KEY` - the private key to the `trustevm-ci-submodule-checkout` GitHub App.
1. `upload-artifacts` - a boolean input that specifies whether or not to upload the artifacts of the build. The default value is `false`. This can be overridden in manual CI runs.

These inputs are used in various steps of the workflow to perform actions such as authentication, downloading artifacts, configuring the build, and uploading artifacts.

## Steps
This workflow performs the following steps:
1. Attach Documentation
1. Checkout the repo with no submodules.
1. Attach an annotation to the GitHub Actions build summary page containing CI documentation.
1. EOS EVM Siklworm Build
1. Authenticate to the `trustevm-ci-submodule-checkout` GitHub app using the [AntelopeIO/github-app-token-action](https://github.com/AntelopeIO/github-app-token-action) action to obtain an ephemeral token.
1. Checkout the repo and submodules using the ephemeral token.
1. Build using `cmake` and `make`.
1. Upload the test binaries to GitHub Actions if the `upload-artifacts` input is set to `true`.

## Outputs
This workflow produces the following outputs:
1. Build Artifacts - `build.tar.gz` containing the built artifacts of unit tests of the evmone project, if the `upload-artifacts` input is set to `true`. Note that only tests are included as we do not really care about other binaries for this repo.

> 💾️ Build artifacts are only attached on-demand for this pipeline because they are >117 MB each, but we only get 2 GB of cumulative artifact storage in GitHub Actions while eos-evm is a private repo. Obtain artifacts by performing a manual build with `upload-artifacts` set to `true`.

## See Also
- [github-app-token-action](https://github.com/AntelopeIO/github-app-token-action) GitHub action
- [EOS EVM Documentation](../../README.md)

For assistance with the CI system, please open an issue in this repo or reach out in the `#help-automation` channel via IM.

***
**_Legal notice_**
This document was generated in collaboration with ChatGPT from OpenAI, a machine learning algorithm or weak artificial intelligence (AI). At the time of this writing, the [OpenAI terms of service agreement](https://openai.com/terms) §3.a states:
> Your Content. You may provide input to the Services (“Input”), and receive output generated and returned by the Services based on the Input (“Output”). Input and Output are collectively “Content.” As between the parties and to the extent permitted by applicable law, you own all Input, and subject to your compliance with these Terms, OpenAI hereby assigns to you all its right, title and interest in and to Output.

This notice is required in some countries.
143 changes: 143 additions & 0 deletions .github/workflows/evmone.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
name: EOS EVM evmone CI

on:
push:
branches:
- main
- release/*
pull_request:
workflow_dispatch:

defaults:
run:
shell: bash

jobs:
documentation:
name: Attach Documentation
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3
with:
fetch-depth: 1
submodules: 'false'

- name: Attach Documentation
run: cat .github/workflows/evmone.md >> $GITHUB_STEP_SUMMARY

d:
name: Discover Platforms
runs-on: ubuntu-latest
outputs:
missing-platforms: ${{steps.discover.outputs.missing-platforms}}
p: ${{steps.discover.outputs.platforms}}
steps:
- name: Discover Platforms
id: discover
uses: AntelopeIO/discover-platforms-action@v1
with:
platform-file: .cicd/platforms.json
password: ${{secrets.GITHUB_TOKEN}}
package-name: builders-evmone

build-platforms:
name: Build Platforms
needs: d
if: needs.d.outputs.missing-platforms != '[]'
strategy:
fail-fast: false
matrix:
platform: ${{fromJSON(needs.d.outputs.missing-platforms)}}
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- name: Login to Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{github.repository_owner}}
password: ${{secrets.GITHUB_TOKEN}}
- name: Build and push
uses: docker/build-push-action@v3
with:
push: true
tags: ${{fromJSON(needs.d.outputs.p)[matrix.platform].image}}
file: ${{fromJSON(needs.d.outputs.p)[matrix.platform].dockerfile}}

build:
name: EOS EVM evmone Build
needs: [d, build-platforms]
if: always() && needs.d.result == 'success' && (needs.build-platforms.result == 'success' || needs.build-platforms.result == 'skipped')
strategy:
fail-fast: false
matrix:
platform: [ ubuntu22 ]
runs-on: ubuntu-latest
container: ${{fromJSON(needs.d.outputs.p)[matrix.platform].image}}

steps:
- name: Checkout Repo
uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: 'recursive'
token: ${{secrets.GITHUB_TOKEN}}

- name: Build EOS EVM evmone
run: .github/workflows/build-tests.sh
env:
CC: gcc-11
CXX: g++-11

- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: build.tar.gz
path: build.tar.gz

unit-test:
name: EOS EVM evmone Unit Tests
needs: [d, build]
if: always() && needs.d.result == 'success' && needs.build.result == 'success'
strategy:
fail-fast: false
matrix:
platform: [ ubuntu22 ]
runs-on: ubuntu-latest
container: ${{fromJSON(needs.d.outputs.p)[matrix.platform].image}}
env:
CC: gcc-11
CXX: g++-11
DCMAKE_BUILD_TYPE: 'Release'

steps:
- name: Update Package Index & Upgrade Packages
run: |
apt-get update
apt-get upgrade -y
apt update
apt upgrade -y

- name: Download EOS EVM evmone builddir
uses: actions/download-artifact@v4
with:
name: build.tar.gz

- name: Extract EOS EVM evmone builddir
id: evm-evmone-build
run: |
mkdir evmone
mv build.tar.gz evmone/
pushd evmone
tar xvf build.tar.gz
pushd build
echo "EVM_EVMONE_BUILD=$(pwd)" >> "$GITHUB_OUTPUT"
popd

- name: Test evmone
run: |
cd ${{ steps.evm-evmone-build.outputs.EVM_EVMONE_BUILD }}/bin/
./evmone-unittests
Loading
Loading