From 166f47adc82b3c01ffb1e0d90d6db8a5e6c9443d Mon Sep 17 00:00:00 2001 From: ws Date: Mon, 7 Oct 2024 17:33:56 +0200 Subject: [PATCH] change default schema and update tests (#1168) --- Jenkinsfile | 35 +++++++++++++++-------------------- utils/flags.go | 2 +- 2 files changed, 16 insertions(+), 21 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 741e23caa..67925096c 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -8,12 +8,17 @@ pipeline { } environment { - STORAGE = '--db-impl carmen --db-variant go-file --carmen-schema 3' + // Aida CLI options + STORAGE = '--db-impl carmen --db-variant go-file --carmen-schema 5' + ARCHIVE = '--archive --archive-variant s5' PRIME = '--update-buffer-size 4000' VM = '--vm-impl lfvm' - AIDADB = '--aida-db=/mnt/aida-db-central/aida-db' - TMPDB = '--db-tmp=/mnt/tmp-disk' + AIDADB = '--aida-db /mnt/aida-db-central/aida-db' + TMPDB = '--db-tmp /mnt/tmp-disk' DBSRC = '/mnt/tmp-disk/state_db_carmen_go-file_${TOBLOCK}' + PROFILE = '--cpu-profile cpu-profile.dat --memory-profile mem-profile.dat --memory-breakdown' + + // Other parameters TRACEDIR = 'tracefiles' FROMBLOCK = 'opera' TOBLOCK = '4600000' @@ -96,26 +101,26 @@ pipeline { stage('aida-sdb replay') { steps { catchError(buildResult: 'FAILURE', stageResult: 'FAILURE', message: 'Test Suite had a failure') { - sh "build/aida-sdb replay ${VM} ${STORAGE} ${TMPDB} ${AIDADB} ${PRIME} --shadow-db --db-shadow-impl geth --cpu-profile cpu-profile.dat --memory-profile mem-profile.dat --memory-breakdown --trace-file ${TRACEDIR}/trace-0.dat ${FROMBLOCK} ${TOBLOCK}" - sh "build/aida-sdb replay ${VM} ${STORAGE} ${TMPDB} ${AIDADB} ${PRIME} --cpu-profile cpu-profile.dat --memory-profile mem-profile.dat --memory-breakdown --trace-dir ${TRACEDIR} ${FROMBLOCK} ${TOBLOCK}" + sh "build/aida-sdb replay ${VM} ${STORAGE} ${TMPDB} ${AIDADB} ${PRIME} ${PROFILE} --shadow-db --db-shadow-impl geth --trace-file ${TRACEDIR}/trace-0.dat ${FROMBLOCK} ${TOBLOCK}" + sh "build/aida-sdb replay ${VM} ${STORAGE} ${TMPDB} ${AIDADB} ${PRIME} ${PROFILE} --trace-dir ${TRACEDIR} ${FROMBLOCK} ${TOBLOCK}" } sh "rm -rf ${TRACEDIR}" } } - stage('aida-vm-sdb s5-archive+validate-state-hash') { + stage('aida-vm-sdb live mode') { steps { catchError(buildResult: 'FAILURE', stageResult: 'FAILURE', message: 'Test Suite had a failure') { - sh "build/aida-vm-sdb substate ${VM} ${AIDADB} ${PRIME} ${TMPDB} --db-impl carmen --validate-state-hash --archive --archive-variant s5 --carmen-schema 5 --cpu-profile cpu-profile.dat --memory-profile mem-profile.dat --memory-breakdown --continue-on-failure ${FROMBLOCK} ${TOBLOCK} " + sh "build/aida-vm-sdb substate ${VM} ${AIDADB} ${PRIME} ${TMPDB} ${STORAGE} --validate-tx --validate-state-hash --cpu-profile cpu-profile.dat --memory-profile mem-profile.dat --memory-breakdown --continue-on-failure ${FROMBLOCK} ${TOBLOCK} " } sh "rm -rf *.dat" } } - stage('aida-vm-sdb validate-tx') { + stage('aida-vm-sdb archive mode') { steps { catchError(buildResult: 'FAILURE', stageResult: 'FAILURE', message: 'Test Suite had a failure') { - sh "build/aida-vm-sdb substate ${VM} ${AIDADB} ${PRIME} ${TMPDB} --db-impl carmen --validate-tx --cpu-profile cpu-profile.dat --memory-profile mem-profile.dat --memory-breakdown --continue-on-failure ${FROMBLOCK} ${TOBLOCK} " + sh "build/aida-vm-sdb substate ${VM} ${AIDADB} ${PRIME} ${TMPDB} ${STORAGE} ${ARCHIVE} ${PROFILE} --keep-db --validate-tx --validate-state-hash --continue-on-failure ${FROMBLOCK} ${TOBLOCK} " } sh "rm -rf *.dat" } @@ -124,17 +129,7 @@ pipeline { stage('aida-vm-sdb archive-inquirer') { steps { catchError(buildResult: 'FAILURE', stageResult: 'FAILURE', message: 'Test Suite had a failure') { - sh "build/aida-vm-sdb substate ${VM} ${AIDADB} ${PRIME} ${TMPDB} --archive --archive-query-rate 5000 --db-impl carmen --validate-tx --cpu-profile cpu-profile.dat --memory-profile mem-profile.dat --memory-breakdown --continue-on-failure ${FROMBLOCK} ${TOBLOCK} " - } - sh "rm -rf *.dat" - } - } - - stage('aida-vm-sdb keep-db') { - steps { - sh "rm -rf ${DBSRC}" - catchError(buildResult: 'FAILURE', stageResult: 'FAILURE', message: 'Test Suite had a failure') { - sh "build/aida-vm-sdb substate ${VM} ${STORAGE} ${TMPDB} ${AIDADB} ${PRIME} --keep-db --archive --archive-variant ldb --db-impl carmen --validate-tx --cpu-profile cpu-profile.dat --memory-profile mem-profile.dat --memory-breakdown --continue-on-failure ${FROMBLOCK} ${TOBLOCK} " + sh "build/aida-vm-sdb substate ${VM} ${AIDADB} ${PRIME} ${TMPDB} ${ARCHIVE} ${PROFILE} --archive-query-rate 5000 --validate-tx --continue-on-failure ${FROMBLOCK} ${TOBLOCK} " } sh "rm -rf *.dat" } diff --git a/utils/flags.go b/utils/flags.go index 337882315..feeeb3ce2 100644 --- a/utils/flags.go +++ b/utils/flags.go @@ -67,7 +67,7 @@ var ( CarmenSchemaFlag = cli.IntFlag{ Name: "carmen-schema", Usage: "select the DB schema used by Carmen's current state DB", - Value: 3, + Value: 5, } ChainIDFlag = cli.IntFlag{ Name: "chainid",