Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
1df1da2
chore: upgrade CI
dt-iohk Sep 1, 2025
93c7efe
chore: generate code
dt-iohk Sep 1, 2025
fd33615
Merge branch 'feat/enable-mobile-support-voices' into feat/catalyst-c…
dt-iohk Sep 2, 2025
c97965f
feat: generate catalyst_compression_native with flutter_rust_bridge
dt-iohk Sep 2, 2025
17d0267
feat: signatures for rust functions
dt-iohk Sep 2, 2025
f3ea349
chore: regenerate
dt-iohk Sep 3, 2025
e02b2aa
feat: implement brotli decoder
dt-iohk Sep 3, 2025
660377e
feat: add zstd algorithm
dt-iohk Sep 3, 2025
71ed1ad
chore: replace catalyst_compression with native rust implementation
dt-iohk Sep 3, 2025
fff1580
refactor: rename frb crates
dt-iohk Sep 3, 2025
d032242
chore: rename compression native to compression
dt-iohk Sep 4, 2025
2ef24ba
refactor: cleanup unnecessary web prefix
dt-iohk Sep 4, 2025
7eda2cd
fix: web prefix
dt-iohk Sep 4, 2025
1335c66
feat: add wasm_bindgen module name
dt-iohk Sep 4, 2025
e5b0592
fix: add missing param
dt-iohk Sep 4, 2025
47b1de7
Merge branch 'feat/enable-mobile-support-voices' into feat/catalyst-c…
dt-iohk Sep 8, 2025
6d53f9f
feat: update flutter_rust_bridge
dt-iohk Sep 8, 2025
26ccacb
chore: pin flutter_rust_bridge to git hosted version
dt-iohk Sep 8, 2025
3012ee9
feat: custom thread pool
dt-iohk Sep 8, 2025
10215d9
feat: custom thread pool in key derivation package
dt-iohk Sep 8, 2025
5656daa
chore: generated files
dt-iohk Sep 8, 2025
74bbe43
feat: config
dt-iohk Sep 9, 2025
c1a5d17
chore: generate code
dt-iohk Sep 9, 2025
a66281e
chore: cleanup + lints
dt-iohk Sep 9, 2025
f20e821
chore: add compression rust tests
dt-iohk Sep 9, 2025
77c7039
chore: sync missing files
dt-iohk Sep 9, 2025
c71d8c8
chore: allow github repo
dt-iohk Sep 9, 2025
f27534a
chore: sync configs
dt-iohk Sep 9, 2025
829342d
chore: fix lints, add code generation to pre-push
dt-iohk Sep 9, 2025
fe25e87
chore: cleanup and lint issues
dt-iohk Sep 9, 2025
feeffa3
chore: generate code
dt-iohk Sep 9, 2025
ffbd53a
fix: wrong type
dt-iohk Sep 9, 2025
577f3a2
chore: docs and syntax fix
dt-iohk Sep 9, 2025
9293a50
fix: lint issues, regenerate
dt-iohk Sep 9, 2025
134c65f
fix: wasm_bindgen name
dt-iohk Sep 10, 2025
cf89fbe
fix: lint issues, missing docs
dt-iohk Sep 10, 2025
67c8b6d
Merge branch 'feat/enable-mobile-support-voices' into feat/catalyst-c…
dt-iohk Sep 10, 2025
a48d9e7
fix: pre-push command fixes
dt-iohk Sep 10, 2025
b9a8cf8
Merge branch 'feat/enable-mobile-support-voices' into feat/catalyst-c…
dt-iohk Sep 11, 2025
8dbe1d3
refactor: align naming with other targets
dt-iohk Sep 11, 2025
4e4312f
fix: melos issues
dt-iohk Sep 11, 2025
965bf3d
chore: cleanup
dt-iohk Sep 11, 2025
200a3eb
fix: earthly targets
dt-iohk Sep 11, 2025
924f7d3
fix: update pre-push tasks to avoid using melos
dt-iohk Sep 11, 2025
3486524
Merge branch 'feat/enable-mobile-support-voices' into feat/catalyst-c…
dt-iohk Sep 11, 2025
7ed9445
Merge branch 'feat/enable-mobile-support-voices' into feat/catalyst-c…
dt-iohk Sep 12, 2025
68ef579
chore: spelling
dt-iohk Sep 12, 2025
fb4b142
chore: reformat
dt-iohk Sep 12, 2025
0c47766
Merge branch 'feat/enable-mobile-support-voices' into feat/catalyst-c…
dt-iohk Sep 12, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .config/dictionaries/project.dic
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,12 @@ dockerenv
dockerhub
domcontentloaded
Dominik
downloadsfolder
donts
dorny
dotenv
dotenvy
dotglob
downloadsfolder
drep
dreps
dt-iohk
Expand Down Expand Up @@ -271,8 +271,8 @@ postcss
Pozhylenkov
Precache
Precertificate
proguard
preprod
proguard
projectcatalyst
Prokhorenko
proptest
Expand Down Expand Up @@ -339,9 +339,9 @@ stevenj
stringzilla
subchain
Subkey
subprojects
submiting
subosito
subprojects
svgs
syncable
SYSROOT
Expand Down
6 changes: 3 additions & 3 deletions Earthfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
VERSION 0.8

IMPORT github.com/input-output-hk/catalyst-ci/earthly/mdlint:v3.5.15 AS mdlint-ci
IMPORT github.com/input-output-hk/catalyst-ci/earthly/cspell:v3.5.15 AS cspell-ci
IMPORT github.com/input-output-hk/catalyst-ci/earthly/postgresql:v3.5.15 AS postgresql-ci
IMPORT github.com/input-output-hk/catalyst-ci/earthly/mdlint:feat/catalyst-compression-setup AS mdlint-ci
IMPORT github.com/input-output-hk/catalyst-ci/earthly/cspell:feat/catalyst-compression-setup AS cspell-ci
IMPORT github.com/input-output-hk/catalyst-ci/earthly/postgresql:feat/catalyst-compression-setup AS postgresql-ci

ARG --global REGISTRY="harbor.shared-services.projectcatalyst.io/dockerhub/library"
FROM ${REGISTRY}/debian:stable-slim
Expand Down
11 changes: 11 additions & 0 deletions catalyst-gateway/.config/nextest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,14 @@ store-success-output = true
# Note that if a description can be extracted from the output, it is always stored in the
# <description> element.
store-failure-output = true

[test-groups]
serial-integration = { max-threads = 1 }

[[profile.default.overrides]]
filter = 'test(/^serial::/)'
test-group = 'serial-integration'

[[profile.ci.overrides]]
filter = 'test(/^serial::/)'
test-group = "serial-integration"
2 changes: 1 addition & 1 deletion catalyst-gateway/Earthfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
VERSION 0.8

IMPORT github.com/input-output-hk/catalyst-ci/earthly/rust:v3.5.13 AS rust-ci
IMPORT github.com/input-output-hk/catalyst-ci/earthly/rust:feat/catalyst-compression-setup AS rust-ci
IMPORT ../ AS repo-ci
IMPORT github.com/input-output-hk/catalyst-voices/catalyst-gateway:main AS cat-gateway-main

Expand Down
2 changes: 2 additions & 0 deletions catalyst-gateway/deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ allow-git = [
"https://github.com/input-output-hk/mithril",
# Maintained fork of an archived crates-io version.
"https://github.com/dariusc93/rust-ipfs",
# TODO(dt-iohk): remove this when forked flutter_rust_bridge is no longer needed
"https://github.com/dt-iohk/flutter_rust_bridge",
]

[licenses]
Expand Down
2 changes: 1 addition & 1 deletion catalyst-gateway/event-db/Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# the database and its associated software.
VERSION 0.8

IMPORT github.com/input-output-hk/catalyst-ci/earthly/postgresql:v3.5.15 AS postgresql-ci
IMPORT github.com/input-output-hk/catalyst-ci/earthly/postgresql:feat/catalyst-compression-setup AS postgresql-ci

# cspell: words

Expand Down
2 changes: 1 addition & 1 deletion catalyst-gateway/tests/Earthfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# cspell: words unittests socat

VERSION 0.8
IMPORT github.com/input-output-hk/catalyst-ci/earthly/spectral:v3.5.15 AS spectral-ci
IMPORT github.com/input-output-hk/catalyst-ci/earthly/spectral:feat/catalyst-compression-setup AS spectral-ci
IMPORT .. AS gateway

# build all necessary docker images required to run `docker-compose.yml` services
Expand Down
2 changes: 1 addition & 1 deletion catalyst-gateway/tests/api_tests/Earthfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
VERSION 0.8

IMPORT github.com/input-output-hk/catalyst-ci/earthly/python:v3.5.12 AS python-ci
IMPORT github.com/input-output-hk/catalyst-ci/earthly/python:feat/catalyst-compression-setup AS python-ci
IMPORT github.com/input-output-hk/catalyst-libs/rust:catalyst-signed-doc/v.0.0.6-refinery-fix AS cat-libs-rust
IMPORT github.com/input-output-hk/catalyst-libs/rust:catalyst-signed-doc/v.0.0.4-refinery-fix AS dep-cat-libs-rust
IMPORT github.com/input-output-hk/catalyst-storage AS cat-storage
Expand Down
2 changes: 1 addition & 1 deletion catalyst_voices/Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ VERSION 0.8

IMPORT ../ AS repo-ci
IMPORT ../catalyst-gateway AS catalyst-gateway
IMPORT github.com/input-output-hk/catalyst-ci/earthly/flutter:v3.5.15 AS flutter-ci
IMPORT github.com/input-output-hk/catalyst-ci/earthly/flutter:feat/catalyst-compression-setup AS flutter-ci

# repo-catalyst-voices - Creates artifacts of all configuration files,
# packages and folders related to catalyst_voices frontend.
Expand Down
1 change: 1 addition & 0 deletions catalyst_voices/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ This repository contains the Catalyst Voices app and packages.
* [Visual Studio Code](https://flutter.dev/docs/get-started/editor?tab=vscode)
* [Android Studio / IntelliJ](https://flutter.dev/docs/get-started/editor?tab=androidstudio)
* [Emacs](https://docs.flutter.dev/get-started/editor?tab=emacs)
* [Rust](https://rustup.rs/): 1.80.0+

❗️We recommend using **Visual Studio Code** as the **default editor** for this project.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
customLLDBInitFile = "$(SRCROOT)/Flutter/ephemeral/flutter_lldbinit"
shouldUseLaunchSchemeArgsEnv = "YES">
<MacroExpansion>
<BuildableReference
Expand Down Expand Up @@ -54,6 +55,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
customLLDBInitFile = "$(SRCROOT)/Flutter/ephemeral/flutter_lldbinit"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
Expand Down
6 changes: 5 additions & 1 deletion catalyst_voices/apps/voices/lib/dependency/dependencies.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import 'dart:async';

import 'package:catalyst_cardano/catalyst_cardano.dart';
import 'package:catalyst_compression/catalyst_compression.dart';
import 'package:catalyst_key_derivation/catalyst_key_derivation.dart';
import 'package:catalyst_voices/app/view/video_cache/app_video_manager.dart';
import 'package:catalyst_voices/permissions/permission_handler_factory.dart';
Expand Down Expand Up @@ -238,7 +239,10 @@ final class Dependencies extends DependencyProvider {
return BlockchainRepository(get<ApiServices>());
})
..registerLazySingleton<SignedDocumentManager>(() {
return const SignedDocumentManager();
return const SignedDocumentManager(
brotli: CatalystBrotliCompressor(),
zstd: CatalystZstdCompressor(),
);
})
..registerLazySingleton<DatabaseDraftsDataSource>(() {
return DatabaseDraftsDataSource(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.14;
MACOSX_DEPLOYMENT_TARGET = 10.15;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = macosx;
SWIFT_COMPILATION_MODE = wholemodule;
Expand Down Expand Up @@ -647,7 +647,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.14;
MACOSX_DEPLOYMENT_TARGET = 10.15;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
Expand Down Expand Up @@ -698,7 +698,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.14;
MACOSX_DEPLOYMENT_TARGET = 10.15;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = macosx;
SWIFT_COMPILATION_MODE = wholemodule;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
enableGPUValidationMode = "1"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
Expand Down
1 change: 1 addition & 0 deletions catalyst_voices/apps/voices/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ dependencies:
catalyst_cardano: ^1.0.0
catalyst_cardano_serialization: ^1.0.0
catalyst_cardano_web: ^1.0.0
catalyst_compression: ^1.0.0
catalyst_key_derivation: ^1.0.0
catalyst_voices_assets:
path: ../../packages/internal/catalyst_voices_assets
Expand Down
1 change: 0 additions & 1 deletion catalyst_voices/apps/voices/web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
<title>Catalyst</title>
<link href="manifest.json" rel="manifest">
<script src="/assets/packages/catalyst_cardano_web/assets/js/catalyst_cardano.js" type="module"></script>
<script src="/assets/packages/catalyst_compression_web/assets/js/catalyst_compression.js" type="module"></script>
<script defer="" src="/assets/packages/flutter_inappwebview_web/assets/web/web_support.js"
type="application/javascript"></script>

Expand Down
12 changes: 8 additions & 4 deletions catalyst_voices/justfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,28 @@ setup-code:
melos bs

# Builds generated code
generate-code: setup-code
generate-code:
cd .. && earthly ./catalyst_voices+code-generator --platform=linux/amd64 --save_locally=true

# Syntax sugar for linking packages and building generated code
bootstrap: generate-code
bootstrap: setup-code generate-code

# Runs all static code checks
check-code:
earthly +build-static-analysis
earthly +check-code-formatting
earthly +check-package-publishing
earthly +check-license
earthly +build-static-analysis

# Runs unit tests
test-code:
# TODO(dt-iohk): enable running unit tests in earthly, remove melos tests,
# currently it fails because of `libsqlite3.so.3.49.1` unable to load on arm64 linux.
earthly +test-unit-native
# melos test-native

# Pre Push Checks
pre-push: check-code
pre-push: generate-code check-code test-code

license-list: setup-code
melos license-list
Expand Down
16 changes: 8 additions & 8 deletions catalyst_voices/melos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ packages:

ignore:
# ignore flutter_rust_bridge packages that are non-conformant with melos
- packages/libs/catalyst_key_derivation/example/**
- /**/cargokit/**
# ignore temporary packages that are non-conformant with melos
- apps/voices/build/**
- /**/build/**

permittedLicenses:
- MIT
Expand Down Expand Up @@ -41,16 +41,12 @@ packageLicenseOverride:
catalyst_cardano_serialization: Apache-2.0
catalyst_cardano_platform_interface: Apache-2.0
catalyst_compression: Apache-2.0
catalyst_compression_web: Apache-2.0
catalyst_cardano_web: Apache-2.0
catalyst_compression_platform_interface: Apache-2.0
catalyst_key_derivation: Apache-2.0
catalyst_key_derivation_web: Apache-2.0
catalyst_key_derivation_platform_interface: Apache-2.0
catalyst_voices_assets: Apache-2.0
catalyst_voices_assets_example: Apache-2.0
catalyst_cardano: Apache-2.0
catalyst_cardano_example: Apache-2.0
catalyst_cardano_web: Apache-2.0
catalyst_voices_localization: Apache-2.0
catalyst_voices_models: Apache-2.0
example: Apache-2.0
Expand Down Expand Up @@ -125,7 +121,11 @@ command:
url: https://github.com/input-output-hk/flutter-quill
path: flutter_quill_extensions
ref: 10be2c8d1fb0d7728183fc883e133b5b48251d62
flutter_rust_bridge: 2.11.1
flutter_rust_bridge:
git:
url: https://github.com/dt-iohk/flutter_rust_bridge
ref: 64678315e8f5a877fc7b78524d9441cd05f42d65
path: frb_dart/
flutter_secure_storage: ^9.2.4
formz: ^0.8.0
google_fonts: ^6.3.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -841,6 +841,10 @@
"@defaultPermissionRationale": {
"description": "Default rationale for permission"
},
"defaultProposalsOrder": "Default",
"@defaultProposalsOrder": {
"description": "Ordering options for proposals"
},
"defaultRole": "Default",
"@defaultRole": {
"description": "Related to account role"
Expand Down Expand Up @@ -2073,10 +2077,6 @@
"@orderProposalsUpdateDateDesc": {
"description": "Order proposals by update date option"
},
"defaultProposalsOrder": "Default",
"@defaultProposalsOrder": {
"description": "Ordering options for proposals"
},
"paginationProposalsCounter": "{from}-{to} of {max} {max, plural, =0{proposals} =1{proposal} other{proposals}}",
"@paginationProposalsCounter": {
"description": "Below pagination list, next to page switch controls",
Expand Down Expand Up @@ -2585,10 +2585,6 @@
"@recoverKeychainMethodsListTitle": {
"description": "Header for recovery methods selection list"
},
"recoverKeychainMethodsNoKeychainFound": "No Catalyst Keychain found on this device.",
"@recoverKeychainMethodsNoKeychainFound": {
"description": "Message shown when no keychain is found on device"
},
"recoverKeychainMethodsSubtitle": "Not to worry, in the next step you can choose the recovery option that applies to you for this device!",
"@recoverKeychainMethodsSubtitle": {
"description": "Subtitle explaining recovery options availability"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import 'package:catalyst_voices_models/catalyst_voices_models.dart';
final class RefsSyncException extends SyncException {
final List<Object> errors;

RefsSyncException(this.errors);
const RefsSyncException(this.errors);

@override
String toString() => 'RefsSyncException errors[${errors.length}]';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import 'package:catalyst_compression/catalyst_compression.dart';
import 'package:catalyst_voices_models/catalyst_voices_models.dart';
import 'package:catalyst_voices_repositories/src/signed_document/signed_document_manager_impl.dart';
import 'package:flutter/foundation.dart';
Expand All @@ -6,7 +7,10 @@ import 'package:flutter/foundation.dart';
abstract interface class SignedDocumentManager {
/// The default constructor for the [SignedDocumentManager],
/// provides the default implementation of the interface.
const factory SignedDocumentManager() = SignedDocumentManagerImpl;
const factory SignedDocumentManager({
required CatalystCompressor brotli,
required CatalystCompressor zstd,
}) = SignedDocumentManagerImpl;

/// Parses the document from the [bytes] representation.
///
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,13 @@ import 'package:equatable/equatable.dart';
const _brotliEncoding = StringValue(CoseValues.brotliContentEncoding);

final class SignedDocumentManagerImpl implements SignedDocumentManager {
const SignedDocumentManagerImpl();
final CatalystCompressor brotli;
final CatalystCompressor zstd;

const SignedDocumentManagerImpl({
required this.brotli,
required this.zstd,
});

@override
Future<SignedDocument> parseDocument(Uint8List bytes) async {
Expand Down Expand Up @@ -60,15 +66,13 @@ final class SignedDocumentManagerImpl implements SignedDocumentManager {
}

Future<Uint8List> _brotliCompressPayload(Uint8List payload) async {
final compressor = CatalystCompression.instance.brotli;
final compressed = await compressor.compress(payload);
final compressed = await brotli.compress(payload);
return Uint8List.fromList(compressed);
}

Future<Uint8List> _brotliDecompressPayload(CoseSign coseSign) async {
if (coseSign.protectedHeaders.contentEncoding == _brotliEncoding) {
final compressor = CatalystCompression.instance.brotli;
final decompressed = await compressor.decompress(coseSign.payload);
final decompressed = await brotli.decompress(coseSign.payload);
return Uint8List.fromList(decompressed);
} else {
return coseSign.payload;
Expand Down
Loading