Skip to content

Commit 4c6defb

Browse files
nathanielcdav1dosmrz2001stbrody
authored
feat: conflict resolution scaffolding (#687)
* wip: adds scaffold for resolver actor * wip: add concluder todos * more notes * chore: move blockchain module into event-svc crate it will require a db connection so this avoids circular deps, plus it doesn't need to be in the validation crate * feat: store chain timestamp proof data in db and read in pipeline for conclusion events * feat: validate time events and propagate proofs through aggregator * fix: rename meta_data -> metadata * fix: typo in comment Co-authored-by: Spencer T Brody <spencer+github@3box.io> * fix: rename time_event_verifier -> time_event_validator * fix: update comment * fix: return error when time proof isn't found * fix: update conclusions test * fix: update migration tests * fix: add before/chain_id to pipeline tests * fix: disable composedb and go-rust migration tests * fix: remove experimental features test config * chore: update comment Co-authored-by: Spencer T Brody <spencer+github@3box.io> * fix: review comments * chore: todo for adding transient validation errors --------- Co-authored-by: David Estes <david@3box.io> Co-authored-by: Mohsin Zaidi <mohsinrzaidi@gmail.com> Co-authored-by: Mohsin Zaidi <2236875+smrz2001@users.noreply.github.com> Co-authored-by: Spencer T Brody <spencer+github@3box.io>
1 parent 7ed45d5 commit 4c6defb

49 files changed

Lines changed: 2149 additions & 729 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build-and-test.yml

Lines changed: 40 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -231,50 +231,51 @@ jobs:
231231
fi
232232
make CERAMIC_ONE_IMAGE_TAG="${{ needs.build.outputs.image_tag }}" TEST_SELECTOR="$test_selector" HERMETIC_CMD=../bin/hermetic-driver hermetic-tests
233233
234-
run-migration-tests:
235-
name: Run Migration Tests
236-
runs-on: ubuntu-latest
237-
environment: tnet-prod-2024
238-
needs:
239-
- build-driver
240-
- publish-suite
241-
- generate-matrix #Needed to know the BUILD_TAG
242-
- build
243-
steps:
244-
-
245-
name: Checkout
246-
uses: actions/checkout@v3
247-
-
248-
name: Setup GKE auth
249-
uses: 'google-github-actions/auth@v1'
250-
with:
251-
credentials_json: ${{ secrets.GKE_SA_KEY }}
252-
-
253-
name: Get GKE credentials
254-
uses: 'google-github-actions/get-gke-credentials@v1'
255-
with:
256-
cluster_name: ${{ vars.GKE_CLUSTER }}
257-
location: ${{ vars.GKE_ZONE }}
258-
- uses: actions/download-artifact@master
259-
with:
260-
name: hermetic-driver
261-
path: ./bin
262-
-
263-
name: Test migration ${{ matrix.networks }}
264-
run: |
265-
set -euxo pipefail
266-
cd tests
267-
export BUILD_TAG=${{ needs.generate-matrix.outputs.build_tag }}
268-
TEST_NETWORK=./migration-networks/basic-go-rust-post.yaml
269-
chmod +x ../bin/hermetic-driver
270-
271-
make CERAMIC_ONE_IMAGE_TAG="${{ needs.build.outputs.image_tag }}" HERMETIC_CMD=../bin/hermetic-driver migration-tests
234+
# run-migration-tests:
235+
# name: Run Migration Tests
236+
# runs-on: ubuntu-latest
237+
# environment: tnet-prod-2024
238+
# needs:
239+
# - build-driver
240+
# - publish-suite
241+
# - generate-matrix #Needed to know the BUILD_TAG
242+
# - build
243+
# steps:
244+
# -
245+
# name: Checkout
246+
# uses: actions/checkout@v3
247+
# -
248+
# name: Setup GKE auth
249+
# uses: 'google-github-actions/auth@v1'
250+
# with:
251+
# credentials_json: ${{ secrets.GKE_SA_KEY }}
252+
# -
253+
# name: Get GKE credentials
254+
# uses: 'google-github-actions/get-gke-credentials@v1'
255+
# with:
256+
# cluster_name: ${{ vars.GKE_CLUSTER }}
257+
# location: ${{ vars.GKE_ZONE }}
258+
# - uses: actions/download-artifact@master
259+
# with:
260+
# name: hermetic-driver
261+
# path: ./bin
262+
# -
263+
# name: Test migration ${{ matrix.networks }}
264+
# run: |
265+
# set -euxo pipefail
266+
# cd tests
267+
# export BUILD_TAG=${{ needs.generate-matrix.outputs.build_tag }}
268+
# TEST_NETWORK=./migration-networks/basic-go-rust-post.yaml
269+
# chmod +x ../bin/hermetic-driver
270+
#
271+
# make CERAMIC_ONE_IMAGE_TAG="${{ needs.build.outputs.image_tag }}" HERMETIC_CMD=../bin/hermetic-driver migration-tests
272272

273273
integration-test-results:
274274
name: Hermetic Test Results
275275
if: ${{ always() }}
276276
runs-on: ubuntu-latest
277-
needs: [run-integration-tests, run-migration-tests]
277+
# needs: [run-integration-tests, run-migration-tests]
278+
needs: [run-integration-tests]
278279
steps:
279280
- run: exit 1
280281
# see https://stackoverflow.com/a/67532120/4907315

CONTRIBUTING.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,18 @@ Using the makefile is not necessary during your development cycle, feel free to
1515

1616
However running `make` before publishing a PR will provide a good signal if you PR will pass CI.
1717

18+
### Migrations
19+
20+
If you need to add to the sqlite database schema, you will need to add a migration using the sqlx CLI.
21+
22+
```sh
23+
cargo install sqlx-cli
24+
# use the name of the migration and the source directory
25+
sqlx migrate add -r "chain_proof" --source ./migrations/sqlite
26+
```
27+
28+
After the up and down files are generated, write the apply/revert SQL in the up/down files. This will be applied automatically at startup.
29+
1830
### Testing Specific Changes
1931

2032
The above `make` targets test changes as a whole.

0 commit comments

Comments
 (0)