Skip to content

Commit

Permalink
ditto
Browse files Browse the repository at this point in the history
  • Loading branch information
JereSalo committed Dec 27, 2024
1 parent 99a7a70 commit 33476f9
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 21 deletions.
22 changes: 22 additions & 0 deletions .github/scripts/publish_levm_hive.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
curl -X POST $url \
-H 'Content-Type: application/json; charset=utf-8' \
--data @- <<EOF
$(jq -n --arg text "$(cat results.md)" '{
"blocks": [
{
"type": "header",
"text": {
"type": "plain_text",
"text": "LEVM Hive Coverage Report"
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": $text
}
}
]
}')
EOF
15 changes: 3 additions & 12 deletions .github/workflows/daily_reports_testing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
uses: actions/setup-go@v5

- name: Build Image with LEVM
run: make build-image-levm
run: cd crates/vm/levm && make build-image-levm

- name: Setup Hive
run: make setup-hive
Expand Down Expand Up @@ -91,18 +91,9 @@ jobs:
# - name: Post results to levm slack channel
# env:
# url: ${{ secrets.LEVM_SLACK_WEBHOOK }}
# run: sh .github/scripts/publish.sh
# run: sh .github/scripts/publish_levm_hive.sh

- name: Post results to test channel for debugging
env:
url: ${{ secrets.TEST_CHANNEL_SLACK }}
run: sh .github/scripts/publish.sh

# This is left commented out to ease debugging later on.
# Comment out all the other "Post to * slack channel" directives
# - name: Post results to test slack channel
# env:
# url: ${{ secrets.TEST_CHANNEL_SLACK }}
# run: sh .github/scripts/publish_loc.sh


run: sh .github/scripts/publish_levm_hive.sh
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ levm_ef_tests_summary_slack.txt
levm_ef_tests_summary_github.txt
levm_ef_tests_summary.txt

loc_report.md
results.md
loc_report
loc_report_slack.txt
loc_report_github.txt
loc_report.json
Expand Down
7 changes: 1 addition & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,6 @@ $(STAMP_FILE): $(shell find crates cmd -type f -name '*.rs') Cargo.toml Dockerfi

build-image: $(STAMP_FILE) ## 🐳 Build the Docker image

FEATURES := "--features ethrex-blockchain/default-levm,ethrex-vm/default-levm"

build-image-levm: ## 🐳 Build the Docker image with LEVM features
docker build -t ethrex --build-arg CARGO_FEATURES=$(FEATURES) .

run-image: build-image ## 🏃 Run the Docker image
docker run --rm -p 127.0.0.1:8545:8545 ethrex --http.addr 0.0.0.0

Expand Down Expand Up @@ -114,7 +109,7 @@ run-hive: build-image setup-hive ## 🧪 Run Hive testing suite
cd hive && ./hive --sim $(SIMULATION) --client ethrex --sim.limit "$(TEST_PATTERN)"

run-hive-debug: build-image setup-hive ## 🐞 Run Hive testing suite in debug mode
cd hive && ./hive --sim $(SIMULATION) --client ethrex --sim.parallelism 16 --sim.limit "$(TEST_PATTERN)" --docker.output
cd hive && ./hive --sim $(SIMULATION) --client ethrex --sim.limit "$(TEST_PATTERN)" --docker.output

clean-hive-logs: ## 🧹 Clean Hive logs
rm -rf ./hive/workspace/logs
Expand Down
2 changes: 0 additions & 2 deletions crates/blockchain/blockchain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ use ethrex_vm::{evm_state, execute_block, spec_id, EvmState, SpecId};
/// Performs pre and post execution validation, and updates the database with the post state.
#[cfg(not(feature = "levm"))]
pub fn add_block(block: &Block, storage: &Store) -> Result<(), ChainError> {
println!("This is REVM add_block");
use ethrex_vm::get_state_transitions;

let block_hash = block.header.compute_block_hash();
Expand Down Expand Up @@ -76,7 +75,6 @@ pub fn add_block(block: &Block, storage: &Store) -> Result<(), ChainError> {
/// Performs pre and post execution validation, and updates the database with the post state.
#[cfg(feature = "levm")]
pub fn add_block(block: &Block, storage: &Store) -> Result<(), ChainError> {
println!("This is LEVM add_block");
let block_hash = block.header.compute_block_hash();

// Validate if it can be the new head and find the parent
Expand Down

0 comments on commit 33476f9

Please sign in to comment.