Skip to content

Commit

Permalink
Identity E2E integration (#755)
Browse files Browse the repository at this point in the history
## tl;dr

- Gets identity working end to end, with tests (pretty much) all uncommented
- Updates bindings to have all required methods
- Removes a bunch of TODOs in the code

## Follow-ups

There are a few changes I had to make to get everything passing that need some follow-up.
- xmtp/xmtp-node-go#391
- #760
- #761
- #750
- #762
- #763

There are also many places that need better test coverage.
  • Loading branch information
neekolas committed May 21, 2024
2 parents 66e2bd3 + b6e7366 commit 76010ba
Show file tree
Hide file tree
Showing 34 changed files with 1,020 additions and 598 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1

- uses: Swatinem/rust-cache@v2
with:
workspaces: |
Expand All @@ -33,6 +33,7 @@ jobs:
timeout-minutes: 20
with:
command: test
args: -- --test-threads=2

- name: Setup Kotlin
run: |
Expand All @@ -46,4 +47,4 @@ jobs:
- name: Run cargo test on FFI bindings
run: |
export CLASSPATH="${{ env.CLASSPATH }}"
cargo test --manifest-path bindings_ffi/Cargo.toml
cargo test --manifest-path bindings_ffi/Cargo.toml -- --test-threads=2
252 changes: 252 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,252 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "lldb",
"request": "launch",
"name": "Debug executable 'xmtp_cli'",
"cargo": {
"args": [
"build",
"--bin=xmtp_cli",
"--package=xmtp_cli"
],
"filter": {
"name": "xmtp_cli",
"kind": "bin"
}
},
"args": [],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug unit tests in executable 'xmtp_cli'",
"cargo": {
"args": [
"test",
"--no-run",
"--bin=xmtp_cli",
"--package=xmtp_cli"
],
"filter": {
"name": "xmtp_cli",
"kind": "bin"
}
},
"args": [],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug unit tests in library 'xmtp_api_grpc'",
"cargo": {
"args": [
"test",
"--no-run",
"--lib",
"--package=xmtp_api_grpc"
],
"filter": {
"name": "xmtp_api_grpc",
"kind": "lib"
}
},
"args": [],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug unit tests in library 'xmtp_proto'",
"cargo": {
"args": [
"test",
"--no-run",
"--lib",
"--package=xmtp_proto"
],
"filter": {
"name": "xmtp_proto",
"kind": "lib"
}
},
"args": [],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug unit tests in library 'xmtp_v2'",
"cargo": {
"args": [
"test",
"--no-run",
"--lib",
"--package=xmtp_v2"
],
"filter": {
"name": "xmtp_v2",
"kind": "lib"
}
},
"args": [],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug unit tests in library 'xmtp_cryptography'",
"cargo": {
"args": [
"test",
"--no-run",
"--lib",
"--package=xmtp_cryptography"
],
"filter": {
"name": "xmtp_cryptography",
"kind": "lib"
}
},
"args": [],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug unit tests in library 'xmtp_mls'",
"cargo": {
"args": [
"test",
"--no-run",
"--lib",
"--package=xmtp_mls"
],
"filter": {
"name": "xmtp_mls",
"kind": "lib"
}
},
"args": [],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug executable 'update-schema'",
"cargo": {
"args": [
"build",
"--bin=update-schema",
"--package=xmtp_mls"
],
"filter": {
"name": "update-schema",
"kind": "bin"
}
},
"args": [],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug unit tests in executable 'update-schema'",
"cargo": {
"args": [
"test",
"--no-run",
"--bin=update-schema",
"--package=xmtp_mls"
],
"filter": {
"name": "update-schema",
"kind": "bin"
}
},
"args": [],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug unit tests in library 'xmtp_id'",
"cargo": {
"args": [
"test",
"--no-run",
"--lib",
"--package=xmtp_id"
],
"filter": {
"name": "xmtp_id",
"kind": "lib"
}
},
"args": [],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug executable 'mls-validation-service'",
"cargo": {
"args": [
"build",
"--bin=mls-validation-service",
"--package=mls_validation_service"
],
"filter": {
"name": "mls-validation-service",
"kind": "bin"
}
},
"args": [],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug unit tests in executable 'mls-validation-service'",
"cargo": {
"args": [
"test",
"--no-run",
"--bin=mls-validation-service",
"--package=mls_validation_service"
],
"filter": {
"name": "mls-validation-service",
"kind": "bin"
}
},
"args": [],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug unit tests in library 'xmtp_user_preferences'",
"cargo": {
"args": [
"test",
"--no-run",
"--lib",
"--package=xmtp_user_preferences"
],
"filter": {
"name": "xmtp_user_preferences",
"kind": "lib"
}
},
"args": [],
"cwd": "${workspaceFolder}"
}
]
}
10 changes: 5 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ futures-core = "0.3.30"
hex = "0.4.3"
jsonrpsee = { version = "0.22", features = ["macros", "server", "client-core"] }
log = "0.4"
openmls = { git = "https://github.com/xmtp/openmls", rev = "52cad0e" }
openmls_basic_credential = { git = "https://github.com/xmtp/openmls", rev = "52cad0e" }
openmls_rust_crypto = { git = "https://github.com/xmtp/openmls", rev = "52cad0e" }
openmls_traits = { git = "https://github.com/xmtp/openmls", rev = "52cad0e" }
openmls = { git = "https://github.com/xmtp/openmls", rev = "b3bcebe7b0405326b8887d17c04878823aed81c1" }
openmls_basic_credential = { git = "https://github.com/xmtp/openmls", rev = "b3bcebe7b0405326b8887d17c04878823aed81c1" }
openmls_rust_crypto = { git = "https://github.com/xmtp/openmls", rev = "b3bcebe7b0405326b8887d17c04878823aed81c1" }
openmls_traits = { git = "https://github.com/xmtp/openmls", rev = "b3bcebe7b0405326b8887d17c04878823aed81c1" }
prost = "^0.12"
prost-types = "^0.12"
rand = "0.8.5"
Expand Down
10 changes: 5 additions & 5 deletions bindings_ffi/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 76010ba

Please sign in to comment.