Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: spacesprotocol/spaces
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.0.4-rc1
Choose a base ref
...
head repository: spacesprotocol/spaces
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
Loading
Showing with 8,139 additions and 1,559 deletions.
  1. +28 −17 .github/workflows/release.yml
  2. +2 −1 .gitignore
  3. +49 −0 CONTRIBUTING.md
  4. +403 −354 Cargo.lock
  5. +1 −1 Cargo.toml
  6. +21 −0 LICENSE
  7. +71 −21 README.md
  8. +16 −0 SECURITY.md
  9. +13 −8 {node → client}/Cargo.toml
  10. +432 −75 {node → client}/src/bin/space-cli.rs
  11. +16 −5 {node → client}/src/bin/spaced.rs
  12. +166 −0 client/src/checker.rs
  13. +18 −17 node/src/node.rs → client/src/client.rs
  14. +14 −1 {node → client}/src/config.rs
  15. +455 −0 client/src/format.rs
  16. +61 −0 client/src/lib.rs
  17. +675 −113 {node → client}/src/rpc.rs
  18. +244 −90 {node → client}/src/source.rs
  19. +94 −32 {node → client}/src/store.rs
  20. +75 −12 {node → client}/src/sync.rs
  21. +643 −251 {node → client}/src/wallets.rs
  22. +9 −4 {node → client}/tests/fetcher_tests.rs
  23. +1,392 −0 client/tests/integration_tests.rs
  24. +2 −2 {node → client}/tests/reorg_tests.rs
  25. +268 −0 install.sh
  26. +0 −13 node/src/lib.rs
  27. +0 −29 node/tests/space_cli_tests.rs
  28. +0 −83 node/tests/wallet_tests.rs
  29. +2 −2 protocol/Cargo.toml
  30. +3 −1 protocol/src/constants.rs
  31. +12 −2 protocol/src/hasher.rs
  32. +2 −0 protocol/src/lib.rs
  33. +1 −1 protocol/src/prepare.rs
  34. +1 −5 protocol/src/script.rs
  35. +41 −18 protocol/src/slabel.rs
  36. +2 −2 protocol/src/validate.rs
  37. +6 −2 testutil/Cargo.toml
  38. +42 −0 testutil/build.rs
  39. +105 −8 testutil/src/lib.rs
  40. +14 −2 testutil/src/spaced.rs
  41. BIN testutil/testdata/regtest.zip
  42. +1 −0 veritas/.gitignore
  43. +31 −0 veritas/Cargo.toml
  44. +107 −0 veritas/README.md
  45. +39 −0 veritas/example/index.js
  46. +13 −0 veritas/example/package-lock.json
  47. +12 −0 veritas/example/package.json
  48. +198 −0 veritas/src/lib.rs
  49. +329 −0 veritas/src/wasm.rs
  50. +42 −0 veritas/wasm.sh
  51. +10 −6 wallet/Cargo.toml
  52. +1 −1 wallet/src/address.rs
  53. +273 −234 wallet/src/builder.rs
  54. +850 −146 wallet/src/lib.rs
  55. +132 −0 wallet/src/nostr.rs
  56. +119 −0 wallet/src/rusqlite_impl.rs
  57. +583 −0 wallet/src/tx_event.rs
45 changes: 28 additions & 17 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -10,41 +10,53 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest, macos-13] # Specify the runners you want to use
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
- os: ubuntu-latest
target: aarch64-unknown-linux-gnu
- os: macos-latest
target: aarch64-apple-darwin
- os: macos-13
target: x86_64-apple-darwin

steps:
- name: Checkout repository
uses: actions/checkout@v4

# Dynamically create a tag from the pushed version
- name: Get the tag name
id: get_tag
run: |
echo "TAG=${GITHUB_REF##*/}" >> $GITHUB_ENV
- name: Set up Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
target: ${{ matrix.target }}

- name: Install cross-compilation tools
if: matrix.target == 'aarch64-unknown-linux-gnu'
run: |
sudo apt-get update
sudo apt-get install -y gcc-aarch64-linux-gnu
- name: Build release binary
run: cargo build --release
env:
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc
run: |
cargo build --release --target ${{ matrix.target }}
# Perhaps we can ignore tests, as they are run by the CI workflow
# - name: Run tests
# run: cargo test --release
#

- name: Get OS and architecture
run: |
echo "os=$(uname -s | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
echo "arch=$(uname -m)" >> $GITHUB_ENV
echo "OS=$(echo ${{ matrix.target }} | grep -q 'linux' && echo 'linux' || echo 'darwin')" >> $GITHUB_ENV
echo "ARCH=$(echo ${{ matrix.target }} | grep -q 'aarch64' && echo 'arm64' || echo 'x86_64')" >> $GITHUB_ENV
- name: Create release archive
run: |
mkdir -p release
ARCH="${{ env.arch }}"
OS="${{ env.os }}"
cp target/release/spaced release/spaced-${{ env.TAG }}-${OS}-${ARCH}
cp target/release/space-cli release/space-cli-${{ env.TAG }}-${OS}-${ARCH}
mkdir -p spaces-${{ env.TAG }}-${{ env.OS }}-${{ env.ARCH }}
cp target/${{ matrix.target }}/release/spaced spaces-${{ env.TAG }}-${{ env.OS }}-${{ env.ARCH }}/spaced
cp target/${{ matrix.target }}/release/space-cli spaces-${{ env.TAG }}-${{ env.OS }}-${{ env.ARCH }}/space-cli
tar -czf spaces-${{ env.TAG }}-${{ env.OS }}-${{ env.ARCH }}.tar.gz spaces-${{ env.TAG }}-${{ env.OS }}-${{ env.ARCH }}
- name: Create GitHub Release
id: create_release
@@ -57,8 +69,7 @@ jobs:
draft: false
prerelease: false
files: |
release/spaced-${{ env.TAG }}-${{ env.os }}-${{ env.arch }}
release/space-cli-${{ env.TAG }}-${{ env.os }}-${{ env.arch }}
spaces-${{ env.TAG }}-${{ env.OS }}-${{ env.ARCH }}.tar.gz
make_latest: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
target
.idea
.DS_store
.DS_store
.zone
49 changes: 49 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Contributing to Spaces

This document is adapted from Bitcoin Core [contributing guide](https://github.com/bitcoin/bitcoin/blob/master/CONTRIBUTING.md). Everyone is welcome to contribute towards development in the form of peer review, testing and patches. This document explains the practical process and guidelines for contributing.

## Getting started

Reviewing and testing is highly valued and the most effective way you can contribute as a new contributor. It also will teach you much more about the code and process than opening pull requests.


### Good First Issue Label

The purpose of the good first issue label is to highlight which issues are suitable for a new contributor without a deep understanding of the codebase.

However, good first issues can be solved by anyone. If they remain unsolved for a longer time, a frequent contributor might address them.

You do not need to request permission to start working on an issue. However, you are encouraged to leave a comment if you are planning to work on it. This will help other contributors monitor which issues are actively being addressed and is also an effective way to request assistance if and when you need it.


## Communication Channels

You can join the [spaces telegram](https://t.me/spacesprotocol).

Discussion about codebase improvements happens in GitHub issues and pull requests.

## Contributor Workflow

The codebase is maintained using the "contributor workflow" where everyone without exception contributes patch proposals using "pull requests" (PRs). This facilitates social contribution, easy testing and peer review.

To contribute a patch, the workflow is as follows:

1. Fork repository (only for the first time)
2. Create topic branch
3. Commit patches

## Squashing Commits

If your pull request contains fixup commits (commits that change the same line of code repeatedly) or too fine-grained commits, it's a good practice to squash your commits to better prepare them for review.

Learn how to write [good commit messages](https://cbea.ms/git-commit/)

## Pull Request Philosophy

It's a good practice to make Patchsets focused. For example, a pull request could add a feature, fix a bug, or refactor code; but not a mixture. Please also avoid super pull requests which attempt to do too much, are overly large, or overly complex as this makes review difficult.


## Copyright

By contributing to this repository, you agree to license your work under the MIT license unless specified otherwise in contrib/debian/copyright or at the top of the file itself. Any work contributed where you are not the original author must contain its license header with the original author(s) and source.

Loading