* chore: adds setting file for NeoVim * feat: wires up LogosStorageConfig db setup * feat: adds implementation of ArchiveManagerLogosStorage and wires it up * feat: wire LogosStorage history archive runtime control * feat: expose history archive index completion signal * feat: expose LogosStorage debug and connect APIs * feat: add history archive timing knobs * chore: align functional archive build toggles * chore: refactors token permissions tests * feat: wire LogosStorage archive APIs, request plumbing, and functional test * fix: use UniversalChatID() for archive link distribution * fix: functional archive tests * feat: respecting online status in history archive task * feat: more control over "ratchetNotFoundDelay" * test: run storage-related functional tests only when USE_LOGOS_STORAGE is true * test: adds LogosStorage backend tests * build: updates testing on CI * build: updates linting on CI * fix: make sure archive_manager_torrent_test has use_torrent guard * fix: formatting * chore: updates nvim settings to include CGO paths * chore: removes redundant "special disabled" files * fix: Python linting issues * build: use system Nim for libstorage native and Docker builds * fix: initialize LogosStorage node config in DefaultNodeConfig * fix: rebase * fix: final review * build: cleans up the vars in test storage and torrent targets in Makefile * fix: stop unseeding before calling CreateHistoryArchiveFromDB (logos) * test: cleans up some noise when closing websockets in functional tests * test: further increase test coverage * fix: linting * chore: update local project nvim config * chore: refactors ArchiveManagerLogosStorage * chore: updates CONTRIBUTING.md * build: temporarily add mc2 convenience scripts * build: reset shared dependency repos before checkout in Makefile Adds `git reset --hard` before `git checkout` in the `clone-nim-sds` and `clone-storage` Makefile targets. Prevents CI failures when the shared `../nim-sds` or `../logos-storage-nim` directories contain unexpected local modifications from previous builds. * fix: use shorter waku message retention policy only for LogosStorage tests * fix: rename COMMUNITY_IMPORTING_HISTORY_ARCHIVE_MESSAGES_FINISHED to COMMUNITY_HISTORY_ARCHIVES_DOWNLOAD_AND_IMPORT_FINISHED * build: move STORAGE and TORRENT envs close to their respective targets * build: more robust cloning target for sds and storage
3.4 KiB
Build status-go
Quick start
make statusgo
Run status-backend
make status-backend
Once that is completed, you can start it straight away by running
./build/bin/status-backend --address=localhost:12345
This will provide full API at http://localhost:12345.
Checkout status-backend docs for more details.
Building with your IDE
status-go can be build as a regular Go project, but requires to pre-generate some files first:
make status-go-deps- install required toolsmake generate- compile protobuf files, build SQL migrations, generate mocks
Building with Docker
docker build .
Building using Nix shell
It is advised but not required to use Nix shell before executing other make targets. Nix shell will ensure that all dependencies are installed. You can enter the development shell by using either of two:
make shell
nix develop --extra-experimental-features 'nix-command flakes'
Build a library for the current platform
make statusgo-library # Build static library
make statusgo-shared-library # Build shared library
Build status-go with nix
The flake.nix file exposes multiple status-go packages that can be built using Nix. To view the available packages for different architectures, run:
nix flake show
To build a specific package, use:
nix build '#name-of-the-package'
For example:
nix build '#status-go-library'
This flake includes a dependency on nwaku, which is pinned to a specific commit to ensure reproducibility and control over its version.
Maintainers are responsible for tracking updates to nwaku and updating the pinned commit accordingly when new versions are released.
Continuous Integration (CI) will validate whether the status-go packages build successfully with Nix, and report the result on pull requests.
Debugging
Android debugging
In order to see the log files while debugging on an Android device, do the following:
- Ensure that the app can write to disk by granting it file permissions. For that, you can for instance set your avatar from a file on disk.
- Connect a USB cable to your phone and make sure you can use adb. Run
adb shell tail -f sdcard/Android/data/im.status.ethereum.debug/files/Download/geth.log
Linting
make lint
Testing
Next, run unit tests:
make test
Unit tests can also be run using go test command. If you want to launch specific test, for instance RPCSendTransactions, use the following command:
go test -v ./api/ -testify.m ^RPCSendTransaction$
Or use make test-single:
make test-single PKG=./messaging/controller/processor TEST=^TestSDSWrappedMessages$
Note -testify.m as testify/suite is used to group individual tests.
To run a single test in a test suite (e.g. TestTransferringKeystoreFiles, which is part of SyncDeviceSuite):
go test -v ./server/pairing -test.run TestSyncDeviceSuite -testify.m ^TestTransferringKeystoreFiles$
Or with make test-single:
make test-single PKG=./server/pairing TEST=TestSyncDeviceSuite TESTIFY_M=^TestTransferringKeystoreFiles$
Note: TestSyncDeviceSuite is not the name of the test suite, but the name of the test function that runs the SyncDeviceSuite suite.