Skip to content
This repository has been archived by the owner on Dec 4, 2024. It is now read-only.

Commit

Permalink
Merge branch 'main' into 172-clarinet-sdk
Browse files Browse the repository at this point in the history
  • Loading branch information
friedger committed Oct 3, 2023
2 parents 1de9742 + 38fdc82 commit d36672b
Show file tree
Hide file tree
Showing 70 changed files with 3,500 additions and 1,117 deletions.
30 changes: 30 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
name: Bug Report
about: Create a report to help us improve
title: ''
labels: ['bug']
assignees: ['ashtonstephens']
---

### Expected Behavior

<!--
Describe in detail what you expected to happen.
-->

### Actual Behavior

<!--
Describe in detail what acctually to happened.
-->

### Steps to Reproduce

<!--
Please include
1. Your environment / dev setup
2. A list of actions to recreate
3. Any other relevant detail
-->

### Screenshots or Videos
33 changes: 33 additions & 0 deletions .github/ISSUE_TEMPLATE/enhancement-request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
name: Enhancement Request
about: Request a new feature or improvement
title: ''
labels: ['enhancement']
assignees: ['ashtonstephens']
---
### Description

<!--
Describe the enhancement in as much unambiguous detail as possible.
-->

### Context

<!--
Explain why this enhancement is needed, what grand scheme it's a part of, and any other relevant background information.
-->

### Expected Approach

<!--
Loosely describe either
- how you would expect to have this handled
- what you'd expect it to look like
-->

### Acceptance Criteria

<!-- ALL TICKETS MUST HAVE ACCEPTANCE CRITERIA AND ARTIFACTS -->

- [ ] PR adds the feature ...
- [ ] ...
36 changes: 36 additions & 0 deletions .github/ISSUE_TEMPLATE/research.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
name: Research / Investigation
about: Track looking into a design or other research work
title: ''
labels: ['research']
assignees: ['ashtonstephens']
---
### Description

<!--
Please explain what is supposed to be researched
-->

### Context

<!--
Please explain WHY this research needs to happen + any considerations.
-->

### Expected Approach

<!--
Please describe the series of steps you would expect someone to take to gather the information. For example...
- [ ] Search online for different options
- [ ] Compare the different options with the core devs and write down notes
- [ ] Draw up a document with the options compared and a recommended approach.
-->

### Artifacts / Acceptance Criteria

<!-- ALL TICKETS MUST HAVE ACCEPTANCE CRITERIA AND ARTIFACTS -->

- [ ] Ticket updates
- [ ] Public document with conclusions and research
- [ ] ...
30 changes: 30 additions & 0 deletions .github/ISSUE_TEMPLATE/task.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
name: Aritrary Task
about: Arbitrary work item with presets
title: ''
labels: ''
assignees: ['ashtonstephens']
---
### Description

<!--
Please explain what needs to be done.
-->

### Context / Purpose

<!--
Please explain why it needs to be done, and what the surrounding factors are.
-->

### Steps

<!--
What steps would you take, loosely, to achieve this.
-->

### Artifacts / Acceptance Criteria

<!-- ALL TICKETS MUST HAVE ACCEPTANCE CRITERIA AND ARTIFACTS -->

- [ ] ...
51 changes: 46 additions & 5 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,47 @@
## Description
<!-- Make sure the PR is easy to scan on the first look, and easy to fully understand when read thoroughly -->
<!--
Make sure the PR is easy to scan on the first look, and easy to fully understand when read thoroughly
-->

## Checklist
- [ ] Additions and modifications are documented
- [ ] Additions and modifications are tested
## Summary of Changes

<!--
Please include EACH of the following information:
1. Summary of the changes
2. The related issue
3. Relevant context
4. Any PRs that need to be merged before this one
-->

## Testing

### Risks

<!--
Please list, loosely, the risks that are associated with this PR. This can be very short. Even a documentation update would have the risk that the added information misleads a user to do or think XYZ.
-->

### How were these changes tested?

<!--
Please describe the following:
1. What tests you ran to verify your changes
2. How to replicate these tests
3. Any relevant details for your test configuration
-->

### What future testing should occur?

<!--
Please list known edge cases or tests that need further testing that don't make sense to add in this PR (integration tests and the like). **Once this PR is approved create an issue for each item and update the following section in the PR description so each bullet has an associated ticket next to it.**
-->

## Checklist:

- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged and published in downstream modules
1 change: 1 addition & 0 deletions .github/workflows/daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ jobs:
- uses: actions/checkout@v3
with:
ref: ${{ env.BRANCH }}

- name: Publish
uses: katyo/publish-crates@v2
with:
Expand Down
26 changes: 24 additions & 2 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@ jobs:

- uses: actions-rs/toolchain@v1
with:
toolchain: stable
toolchain: nightly
override: true
components: rustfmt, clippy

- uses: davidB/rust-cargo-make@v1
with:
Expand All @@ -45,7 +46,7 @@ jobs:
run: cargo make --profile github-actions format

coverage:
needs: generate-lockfile
needs: clarinet
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -72,6 +73,7 @@ jobs:
fail_ci_if_error: true

clarinet:
needs: linter
runs-on: ubuntu-latest
steps:
- name: Checkout repository
Expand Down Expand Up @@ -106,6 +108,26 @@ jobs:
verbose: false
flags: unittests
ignore: tests
devenv:
timeout-minutes: 60
runs-on: ubuntu-latest
permissions:
pull-requests: read
steps:
- uses: dorny/paths-filter@v2
id: changes
with:
filters: |
devenv:
- 'devenv/**'
- name: Checkout
if: steps.changes.outputs.devenv == 'true'
uses: actions/checkout@v3

- name: Build devenv containers
if: steps.changes.outputs.devenv == 'true'
run: ./devenv/build.sh

vitest:
runs-on: ubuntu-latest
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ romeo/testing/
romeo/asset-contract/.test
romeo/asset-contract/.coverage
**/.DS_Store
**/romeo.log
node_modules
1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ resolver = "2"
[workspace.dependencies]
anyhow = "1.0"
array-bytes = "6.1.0"
async-trait = "0.1.73"
backoff = "0.4.0"
bdk = "0.28.1"
bitcoin = "0.29.2"
Expand Down
2 changes: 1 addition & 1 deletion Makefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ args = ["fmt", "--check", "--verbose"]
[tasks.format-clippy]
install_crate = "clippy" # uses the stable version.
command = "cargo"
args = ["clippy", "--", "-D", "warnings", "-W", "clippy::all"]
args = ["clippy","--all-features", "--all-targets", "--", "-D", "warnings", "-W", "clippy::all"]

[tasks.format]
dependencies = ["format-clippy", "format-fmt"]
Expand Down
8 changes: 7 additions & 1 deletion devenv/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,12 @@ There is a helper script at the top level directory to facilitate logging:
./log stacks-api
./log stacks-explorer
./log postgres
./log mongodb
./log miner
./log sbtc
./log electrs
./log sbtc-bridge-web
./log sbtc-bridge-api
```
## Services

Expand Down Expand Up @@ -109,7 +111,11 @@ The sBTC bridge app is running at:
http://127.0.0.1:8080/
```
### sBTC Bridge API
TBD
The sBTC bridge api is running at:

```
http://127.0.0.1:3010/
```

### Electrs (Electrum Rust Server)
The electrs service is running at:
Expand Down
3 changes: 3 additions & 0 deletions devenv/bitcoin-explorer/docker-compose-bitcoin-explorer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,8 @@ services:
BTCEXP_BITCOIND_PASS: devnet
BTCEXP_BITCOIND_RPC_TIMEOUT: 5000
BTCEXP_BITCOIND_URI: bitcoin://devnet:devnet@bitcoin:18443?timeout=10000
BTCEXP_ADDRESS_API: electrum
BTCEXP_ELECTRUM_SERVERS: tcp://electrs:60401
BTCEXP_ELECTRUM_TXINDEX: true
BTCEXP_SLOW_DEVICE_MODE: false
BTCEXP_UI_THEME: dark
49 changes: 48 additions & 1 deletion devenv/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,15 @@ services:
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
mongodb:
image: mongo:6.0
container_name: mongodb
ports:
- 27017:27017
environment:
MONGO_INITDB_ROOT_USERNAME: devnet
MONGO_INITDB_ROOT_PASSWORD: devnet
MONGO_INITDB_DATABASE: devnet
miner:
image: miner:latest
container_name: miner
Expand Down Expand Up @@ -65,7 +74,7 @@ services:
GIT_BRANCH: 'v7.3.0'
ports:
- 3999:3999
- 3700:3700
- 3700:3700
depends_on:
- postgres
- stacks
Expand Down Expand Up @@ -126,6 +135,9 @@ services:
BTCEXP_BITCOIND_PASS: devnet
BTCEXP_BITCOIND_RPC_TIMEOUT: 5000
BTCEXP_BITCOIND_URI: bitcoin://devnet:devnet@bitcoin:18443?timeout=10000
BTCEXP_ADDRESS_API: electrum
BTCEXP_ELECTRUM_SERVERS: tcp://electrs:60401
BTCEXP_ELECTRUM_TXINDEX: true
BTCEXP_SLOW_DEVICE_MODE: false
BTCEXP_UI_THEME: dark
electrs:
Expand Down Expand Up @@ -157,6 +169,40 @@ services:
RUST_BACKTRACE: 1
volumes:
- $PWD/sbtc/docker/config.json:/romeo/config.json
sbtc-bridge-api:
image: sbtc-bridge-api:latest
container_name: sbtc-bridge-api
build:
context: ./sbtc-bridge-api/docker
args:
BRIDGE_GIT_URI: https://github.com/stacks-network/sbtc-bridge-api.git
BRIDGE_GIT_BRANCH: main
depends_on:
- bitcoin
- miner
- stacks
- stacks-api
- postgres
- stacks-explorer
- bitcoin-explorer
- mongodb
- sbtc
ports:
- 3010:3010
environment:
NODE_ENV: dev
btcNode: bitcoin:18443
btcRpcUser: devnet
btcRpcPwd: devnet
network: testnet
bitcoinExplorerUrl: http://bitcoin-explorer:3002/api
stacksExplorerUrl: http://stacks-explorer:3000
stacksApi: http://stacks-api:3999
sbtcContractId: ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.asset
mongoDbUrl: mongodb
mongoDbName: devnet
mongoUser: devnet
mongoPwd: devnet
sbtc-bridge-web:
image: sbtc-bridge-web:latest
container_name: sbtc-bridge-web
Expand All @@ -170,5 +216,6 @@ services:
- bitcoin-explorer
- miner
- sbtc
- sbtc-bridge-api
ports:
- 8080:8080
Loading

0 comments on commit d36672b

Please sign in to comment.