- Added comprehensive bounds checking to prevent buffer overruns in multicall parsing - Implemented graduated validation system (Strict/Moderate/Permissive) to reduce false positives - Added LRU caching system for address validation with 10-minute TTL - Enhanced ABI decoder with missing Universal Router and Arbitrum-specific DEX signatures - Fixed duplicate function declarations and import conflicts across multiple files - Added error recovery mechanisms with multiple fallback strategies - Updated tests to handle new validation behavior for suspicious addresses - Fixed parser test expectations for improved validation system - Applied gofmt formatting fixes to ensure code style compliance - Fixed mutex copying issues in monitoring package by introducing MetricsSnapshot - Resolved critical security vulnerabilities in heuristic address extraction - Progress: Updated TODO audit from 10% to 35% complete 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
140 lines
4.4 KiB
YAML
140 lines
4.4 KiB
YAML
pipeline:
|
|
name: Staging Promotion
|
|
identifier: staging_promotion
|
|
projectIdentifier: mev_bot
|
|
orgIdentifier: default
|
|
tags: {}
|
|
properties:
|
|
ci:
|
|
codebase:
|
|
connectorRef: account.git
|
|
repoName: fraktal/mev-beta
|
|
build:
|
|
type: branch
|
|
spec:
|
|
branch: <+input>
|
|
stages:
|
|
- stage:
|
|
name: Build & Test
|
|
identifier: build_test
|
|
description: Run Drone-equivalent checks inside Harness.
|
|
type: CI
|
|
spec:
|
|
cloneCodebase: true
|
|
platform:
|
|
os: Linux
|
|
arch: Amd64
|
|
execution:
|
|
steps:
|
|
- step:
|
|
type: Run
|
|
name: Lint
|
|
identifier: lint
|
|
spec:
|
|
shell: Bash
|
|
command: |
|
|
go mod download
|
|
golangci-lint run --timeout=10m
|
|
- step:
|
|
type: Run
|
|
name: UnitTests
|
|
identifier: unit_tests
|
|
spec:
|
|
shell: Bash
|
|
command: |
|
|
GOCACHE=$(pwd)/.gocache go test -race -coverprofile=coverage.out ./...
|
|
test -s coverage.out
|
|
- step:
|
|
type: Run
|
|
name: MathAudit
|
|
identifier: math_audit
|
|
spec:
|
|
shell: Bash
|
|
command: |
|
|
GOCACHE=$(pwd)/.gocache go run ./tools/math-audit --vectors default --report reports/math/latest
|
|
ls -l reports/math/latest
|
|
- step:
|
|
type: Run
|
|
name: ProfitSimulation
|
|
identifier: profit_simulation
|
|
spec:
|
|
shell: Bash
|
|
command: |
|
|
./scripts/run_profit_simulation.sh
|
|
cat reports/simulation/latest/summary.md
|
|
caching:
|
|
enabled: true
|
|
- stage:
|
|
name: Package
|
|
identifier: package
|
|
type: CI
|
|
spec:
|
|
cloneCodebase: false
|
|
platform:
|
|
os: Linux
|
|
arch: Amd64
|
|
execution:
|
|
steps:
|
|
- step:
|
|
type: Run
|
|
name: DockerBuild
|
|
identifier: docker_build
|
|
spec:
|
|
shell: Bash
|
|
command: |
|
|
docker build -t mev-bot:${HARNESS_BUILD_NUMBER} .
|
|
docker save mev-bot:${HARNESS_BUILD_NUMBER} -o mev-bot.tar
|
|
- step:
|
|
type: Run
|
|
name: PublishArtifact
|
|
identifier: publish_artifact
|
|
spec:
|
|
shell: Bash
|
|
command: |
|
|
echo "Uploading mev-bot.tar to artifact store"
|
|
when:
|
|
pipelineStatus: Success
|
|
- stage:
|
|
name: Deploy to Staging
|
|
identifier: deploy_staging
|
|
type: CD
|
|
spec:
|
|
deploymentType: Kubernetes
|
|
service:
|
|
serviceRef: staging
|
|
environment:
|
|
environmentRef: staging
|
|
execution:
|
|
steps:
|
|
- step:
|
|
type: ShellScript
|
|
name: HelmUpgrade
|
|
identifier: helm_upgrade
|
|
spec:
|
|
shell: Bash
|
|
source: Inline
|
|
script: |
|
|
helm upgrade --install mev-bot charts/mev-bot \
|
|
--set image.tag=${HARNESS_BUILD_NUMBER} \
|
|
--namespace mev-bot-staging
|
|
- step:
|
|
type: ShellScript
|
|
name: PostDeployChecks
|
|
identifier: post_deploy_checks
|
|
spec:
|
|
shell: Bash
|
|
source: Inline
|
|
script: |
|
|
kubectl rollout status deploy/mev-bot -n mev-bot-staging --timeout=120s
|
|
kubectl logs deploy/mev-bot -n mev-bot-staging | tail -n 100
|
|
rollbackSteps:
|
|
- step:
|
|
type: ShellScript
|
|
name: Rollback
|
|
identifier: rollback
|
|
spec:
|
|
shell: Bash
|
|
source: Inline
|
|
script: |
|
|
helm rollback mev-bot 1 || true
|