Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accumulated changes from Gitlab #1166

Merged
merged 342 commits into from
Sep 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
342 commits
Select commit Hold shift + click to select a range
a6df2e0
Add a command line argument to skip the initial block download check
alfiedotwtf Aug 21, 2023
ee3b727
Add functional tests for the IBD checks on the command line
alfiedotwtf Aug 21, 2023
8142a24
Renamed SerializedSeedPhrase to SerializableSeedPhrase
TheQuantumPhysicist Aug 21, 2023
18b62a0
Rename save seed to store seed
TheQuantumPhysicist Aug 21, 2023
9187ca0
Remove rand from bip39 crate
TheQuantumPhysicist Aug 21, 2023
fa2fe5f
Use 32 bytes for entropy
TheQuantumPhysicist Aug 21, 2023
66a759f
Assert that phrase mnemonic word count is 24 for 32 bytes entropy
TheQuantumPhysicist Aug 21, 2023
bb13f0b
Make the constant MNEMONIC_24_WORDS_ENTROPY_SIZE
TheQuantumPhysicist Aug 21, 2023
38a419f
Minor docs update
TheQuantumPhysicist Aug 21, 2023
bc9b98c
Merge branch 'orphan-tx-remote-only' into 'master'
TheQuantumPhysicist Aug 21, 2023
db79d97
Merge branch 'feature/save-seed-phrase-wallet' into 'master'
TheQuantumPhysicist Aug 21, 2023
76fcdd3
Merge branch 'mempool-iface-add-tx-split' into 'master'
TheQuantumPhysicist Aug 21, 2023
9f81b78
Merge branch 'alfie/blockprod-ibd' into 'master'
TheQuantumPhysicist Aug 21, 2023
9b9368c
Fix clippy
pavel-kokolemin Aug 22, 2023
6a81cc2
Merge branch 'fix_clippy' into 'master'
TheQuantumPhysicist Aug 22, 2023
9ea9fd6
rustls-webpki versions were updated to fix the vulnerability https://…
ImplOfAnImpl Aug 22, 2023
43d4ebe
Merge branch 'update_rustls_webpki' into 'master'
TheQuantumPhysicist Aug 22, 2023
72a043a
Add clippy and deny to CI
TheQuantumPhysicist Aug 22, 2023
1afa9d8
Add stages to the stages array in gitlab ci file
TheQuantumPhysicist Aug 22, 2023
321f03a
Use random path for clones
TheQuantumPhysicist Aug 22, 2023
c7d5ff6
Add pipline id to the clone dir
TheQuantumPhysicist Aug 22, 2023
b5bcf5b
Disable custom build dir for now
TheQuantumPhysicist Aug 23, 2023
0b25bb1
Use RUST_LOG=debug and RUST_BRACKTRACE=full for gitlab CI
TheQuantumPhysicist Aug 23, 2023
a1e6d3e
Commented line kept by mistake
TheQuantumPhysicist Aug 23, 2023
ecf3ef5
Install cargo deny before using it in CI
TheQuantumPhysicist Aug 23, 2023
0456c34
Merge branch 'fix/gitlab_ci' into 'master'
TheQuantumPhysicist Aug 23, 2023
ad3761f
Update .gitlab-ci.yml file
Aug 24, 2023
e36adef
Update .gitlab-ci.yml file
Aug 24, 2023
2c1fec9
Bind to loopback through IPv4 because IPv6 is causing issues for dock…
TheQuantumPhysicist Aug 24, 2023
0fed658
Enable custom git clone path for gitlab CI
TheQuantumPhysicist Aug 24, 2023
d906810
Merge branch 'fix/ci_different_dirs_for_builds' into 'fix/p2p_tests_f…
TheQuantumPhysicist Aug 24, 2023
8ec9106
Add clippy manually + get rid of the many unnecessary cleans after ev…
TheQuantumPhysicist Aug 24, 2023
03e3636
Minor fix in gitlab CI script
TheQuantumPhysicist Aug 24, 2023
9e626bd
Disable custom build dir in CI temporarily
TheQuantumPhysicist Aug 24, 2023
0d1bf0b
Add rustfmt to cargo
TheQuantumPhysicist Aug 24, 2023
7492816
Merge branch 'fix/p2p_tests_for_docker' into 'master'
TheQuantumPhysicist Aug 24, 2023
0972608
Attempt to get custom build dir to work
TheQuantumPhysicist Aug 24, 2023
525cffd
Remove true randomization
TheQuantumPhysicist Aug 24, 2023
abe4014
Minor comment in CI file
TheQuantumPhysicist Aug 24, 2023
45d0dae
Jam everything in one stage to avoid unnecessary cleaning
TheQuantumPhysicist Aug 24, 2023
e015b37
Merge branch 'fix/ci_custom_build_dir' into 'master'
TheQuantumPhysicist Aug 24, 2023
f392ca9
Upgrade rust version to 1.72, and appease clippy accordingly + add so…
TheQuantumPhysicist Aug 28, 2023
80ed367
Upgrade a few crates in the main Cargo.toml
TheQuantumPhysicist Aug 28, 2023
5cd272b
Update cargo crates with cargo update
TheQuantumPhysicist Aug 28, 2023
3c2f052
Split gitlab stages again to view errors
TheQuantumPhysicist Aug 28, 2023
2bc4e6e
Merge branch 'fix/clippy' into 'master'
TheQuantumPhysicist Aug 28, 2023
371f3fc
Fix the best_known_header_is_considered test in p2p
ImplOfAnImpl Aug 28, 2023
6405ddf
Minor review comment was applied; log::trace is used to print SyncMes…
ImplOfAnImpl Aug 28, 2023
b0fd5a2
Rename old wallet to mini_wallet
OBorce Aug 26, 2023
7017692
Merge branch 'fix_test_best_known_header_is_considered' into 'master'
TheQuantumPhysicist Aug 28, 2023
4f19c9e
Add functional test wallet utils and a simple test
OBorce Aug 26, 2023
1143525
Add wallet DB v2 with chain info
OBorce Aug 21, 2023
97b7be7
Add tx index in block to preserver ordering
OBorce Aug 21, 2023
0f3136f
Add method for creating DB storage from a raw dump
OBorce Aug 22, 2023
ccdd6b9
Add test for migrating wallet DB to v2
OBorce Aug 22, 2023
307db1e
Make a backup of the wallet file before migrating
OBorce Aug 22, 2023
e52ff8e
Skip rescanning the blockchain for new wallets
OBorce Jul 24, 2023
b093bad
Add separate recover wallet functions
OBorce Jul 25, 2023
7083a35
Sync the next unused account
OBorce Aug 16, 2023
497c72f
add a test for recovering a wallet with multiple accounts
OBorce Aug 16, 2023
71f6da5
Update test for account creation
OBorce Aug 17, 2023
f6388de
Extract code for clarity
OBorce Aug 18, 2023
d6b1f67
Fix wallet import (gui)
pavel-kokolemin Aug 21, 2023
30a3859
Remove wallet state, pass best block on creation
OBorce Aug 22, 2023
090e3c0
Make CommandHandler be the owner of CliController
OBorce Aug 23, 2023
b148786
Don't keep AnyoneCanSpend transactions in the wallet
OBorce Aug 26, 2023
a5b924e
Allow unlocking the wallet on load
OBorce Aug 29, 2023
476941f
Add functional test for wallet account recovery
OBorce Aug 29, 2023
e1e4c89
Merge branch 'feature/wallet-functionl-test-utils' into 'master'
TheQuantumPhysicist Aug 29, 2023
c51454d
Lower pool margin when creating from the wallet gui
OBorce Aug 29, 2023
15ced47
Cleanup wallet account recovery functional test
OBorce Aug 29, 2023
9e466e4
Fix check for feerate on utxos
OBorce Aug 28, 2023
3061743
Merge branch 'feature/wallet-accounts-recovery' into 'master'
TheQuantumPhysicist Aug 30, 2023
3b35578
A bunch of minor changes that I've made while experimenting on v2
ImplOfAnImpl Aug 30, 2023
8799bc2
Merge branch 'p2p_generic_improvements' into 'master'
TheQuantumPhysicist Aug 30, 2023
5d59869
Add block relay peers
pavel-kokolemin Aug 30, 2023
caf65fa
Merge branch 'fix/wallet-check-feerate' into 'master'
TheQuantumPhysicist Aug 30, 2023
b1423c3
Minor style fixes (p2p)
pavel-kokolemin Aug 30, 2023
d19cc6c
Use gdk with rfd to fix slow build regression
pavel-kokolemin Aug 30, 2023
912cc40
Reduce Argon2 params to appease small hardware
TheQuantumPhysicist Aug 30, 2023
1f30a85
Add libgtk-3-dev to gitlab CI
TheQuantumPhysicist Aug 30, 2023
59fe18a
Merge branch 'block_relay_peers' into 'master'
TheQuantumPhysicist Aug 30, 2023
bb4ad53
Merge branch 'fix/argon2params_again' into 'master'
TheQuantumPhysicist Aug 30, 2023
fc2e607
Merge branch 'fix_rfd' into 'master'
TheQuantumPhysicist Aug 30, 2023
bc17e9b
invalidate_block and reset_block_failure_flags functions were impleme…
ImplOfAnImpl Aug 29, 2023
2ad35bd
tests for BestChainCandidates
ImplOfAnImpl Aug 30, 2023
f0924f7
Minor outbound peers selection refactor (p2p)
pavel-kokolemin Aug 31, 2023
31ce878
Connect to 3 block relay outbound peers (p2p)
pavel-kokolemin Aug 31, 2023
dca9141
Evict block relay peers
pavel-kokolemin Aug 31, 2023
39188d1
A p2p test for block invalidation was added
ImplOfAnImpl Aug 30, 2023
af639f0
Implement anchor peers (p2p)
pavel-kokolemin Aug 31, 2023
b9188c3
Minor refactor fixes for PR
TheQuantumPhysicist Aug 31, 2023
ab3f5d7
Merge branch 'anchor_peers' into 'master'
TheQuantumPhysicist Aug 31, 2023
5314873
Fix the functional wallet tests on Windows
OBorce Aug 31, 2023
d687e01
Minor formatting fix
TheQuantumPhysicist Sep 1, 2023
cc135cc
Merge branch 'fix/windows-wallet-functional-tests' into 'master'
TheQuantumPhysicist Sep 1, 2023
d9ce669
trailing whitespace check was added to codecheck.py; the script was m…
ImplOfAnImpl Sep 1, 2023
1fef5d7
Merge branch 'improve_code_checking_script' into 'master'
TheQuantumPhysicist Sep 1, 2023
33f778f
Merge branch 'block_invalidation' into 'master'
TheQuantumPhysicist Sep 1, 2023
771fa5d
mempool: Implement an orphan scheduling work queue
iljakuklic Aug 15, 2023
d812dc1
mempool: Integrate orphan tx work queue into mempool
iljakuklic Aug 29, 2023
6f67332
mempool: Introduce OrphanEntry + fix an issue of dropped orphans
iljakuklic Aug 29, 2023
f5ab84e
mempool: Orphan work queue testing
iljakuklic Aug 30, 2023
be18619
mempool: Address clippy concerns
iljakuklic Aug 31, 2023
795072b
Add wallet function to retrieve addresses with
TheQuantumPhysicist Sep 4, 2023
e108731
Minor fix for used key indexes calculations
TheQuantumPhysicist Sep 4, 2023
4354973
mempool: Minor work queue changes
iljakuklic Sep 4, 2023
69d9f20
Reformat printed addresses for receive addresses with usage
TheQuantumPhysicist Sep 4, 2023
03d11df
Appease clippy
TheQuantumPhysicist Sep 4, 2023
977c76c
Add missing new line
TheQuantumPhysicist Sep 4, 2023
73887eb
More text manipulation for wallet receive addresses
TheQuantumPhysicist Sep 4, 2023
1eea4e8
Use prettytable printer for addresses table
TheQuantumPhysicist Sep 4, 2023
cfb1a72
Expand the docs of the function ShowReceiveAddresses
TheQuantumPhysicist Sep 4, 2023
3ab774b
Merge branch 'orphan-tx-work-queue' into 'master'
TheQuantumPhysicist Sep 4, 2023
5a8e551
Use extend instead of for_each()
TheQuantumPhysicist Sep 5, 2023
a114d6b
Fix starting to stake when the wallet is empty
OBorce Sep 6, 2023
70d4c64
Fix migration v2 to rescan the genesis block correctly
OBorce Sep 6, 2023
bc30427
Change start staking command success message
OBorce Sep 6, 2023
e26aedd
Add tests for get address usage command
OBorce Sep 6, 2023
f7df936
Merge branch 'feat/wallet_address_usage' into 'master'
TheQuantumPhysicist Sep 6, 2023
5416ec4
Merge branch 'fix/empty-wallet-staking' into 'master'
TheQuantumPhysicist Sep 6, 2023
d43a906
Fix docker build script
alfiedotwtf Sep 6, 2023
0990545
Add build dependencies for node-gui
alfiedotwtf Sep 6, 2023
9d48f36
Swap COPY and RUN for better caching
alfiedotwtf Sep 7, 2023
009ac06
Merge branch 'alfie/docker-build-fixes' into 'master'
TheQuantumPhysicist Sep 7, 2023
2cdbba8
common: Simplify implementation of some uint methods
iljakuklic Sep 8, 2023
9f38869
common: Verify some uint properties using kani
iljakuklic Sep 8, 2023
7b35e6e
Implement wallet Rescan blockchain command
OBorce Sep 1, 2023
16108c3
Support manual selection of UTXOs for a transaction
OBorce Sep 6, 2023
da11858
Add tests for UTXO selection
OBorce Sep 8, 2023
c591679
Add functional tests for tokens and nfts
OBorce Aug 30, 2023
2fea117
Add negative tests for UTXO selection
OBorce Sep 8, 2023
09d05e0
Add a kani runner script
iljakuklic Sep 8, 2023
873f87f
Minor fix
TheQuantumPhysicist Sep 8, 2023
69129c5
Merge branch 'feature/wallet-user-made-transactions' into 'master'
TheQuantumPhysicist Sep 8, 2023
b7c37dd
Merge branch 'feature/wallet-functional-tests' into 'master'
TheQuantumPhysicist Sep 8, 2023
838da9b
Merge branch 'uint-simplify-verify' into 'master'
TheQuantumPhysicist Sep 8, 2023
b63228b
Fix deadlock when stderr buffer is filled up
OBorce Sep 9, 2023
1982d74
Merge branch 'fix/wallet-functional-tests-stderr' into 'master'
TheQuantumPhysicist Sep 11, 2023
346e3d3
Save wallet stdout and commands in functional tests
OBorce Sep 11, 2023
503dfad
Fix UTXO selection range in unit test
OBorce Sep 11, 2023
45d492d
Merge branch 'feature/save-wallet-functional-test-stdout' into 'master'
TheQuantumPhysicist Sep 11, 2023
f0e3171
Merge branch 'fix/utxo-selection-test' into 'master'
TheQuantumPhysicist Sep 11, 2023
bd2409d
Empty api server template
TheQuantumPhysicist Aug 2, 2023
8596761
Initial basic storage interface an in-memory implementation
TheQuantumPhysicist Aug 3, 2023
0343373
Add basic sync implementation (api server)
pavel-kokolemin Aug 3, 2023
abf6172
License and appease clippy
TheQuantumPhysicist Aug 3, 2023
9ccbfc2
Clean up of errors and traits
TheQuantumPhysicist Aug 5, 2023
a2c9e1f
More refactoring and clean up of API server
TheQuantumPhysicist Aug 5, 2023
a270e3e
Minor file rename
TheQuantumPhysicist Aug 5, 2023
0e66000
Add license and format
TheQuantumPhysicist Aug 5, 2023
bff0b79
Initialization of API server scanner and some refactoring
TheQuantumPhysicist Aug 5, 2023
7b933c6
Initialization of API server scanner and some refactoring
TheQuantumPhysicist Aug 5, 2023
adaee62
Add storage version and best block to storage
TheQuantumPhysicist Aug 6, 2023
8443ae4
Make api storage sets mutable
TheQuantumPhysicist Aug 6, 2023
78a78c5
Add api-server-common to scanner-lib
TheQuantumPhysicist Aug 6, 2023
cf7f029
Add sqlx and some refactoring
TheQuantumPhysicist Aug 6, 2023
37ab545
Add license to sqlx.rs
TheQuantumPhysicist Aug 6, 2023
e0f5758
Add initialization functions to API server storage API
TheQuantumPhysicist Aug 6, 2023
dcf77c1
Add license to impls/mod.rs
TheQuantumPhysicist Aug 6, 2023
2452fe7
Struct for sqlx made with minimal implementation
TheQuantumPhysicist Aug 6, 2023
07e40f9
Blockchain state initial implementation
TheQuantumPhysicist Aug 7, 2023
b9cd4f3
Minor - module moved to directory
TheQuantumPhysicist Aug 7, 2023
9ceeab0
Add auxiliary block data and height vs id tables to api storage
TheQuantumPhysicist Aug 7, 2023
6a76d84
Get rid of unnecessary encoding/decoding in in-memory storage api imp…
TheQuantumPhysicist Aug 7, 2023
dd376de
Implement blockchain state for generic api storage
TheQuantumPhysicist Aug 7, 2023
8c58a20
Move blockchain state impl to scanner lib
TheQuantumPhysicist Aug 7, 2023
f9af444
Minor
TheQuantumPhysicist Aug 7, 2023
b4681df
Revamp in-memory storage for api server and make it compatible with s…
TheQuantumPhysicist Aug 7, 2023
73f7b89
Minor
TheQuantumPhysicist Aug 7, 2023
45a12ed
Minor
TheQuantumPhysicist Aug 7, 2023
85b47e6
Include owning block information when storing transactions in the api…
TheQuantumPhysicist Aug 7, 2023
b943b01
First working test of the scanner with some fixes
TheQuantumPhysicist Aug 8, 2023
c9f3f92
Minor
TheQuantumPhysicist Aug 8, 2023
c6b60b5
Basic sqlx query
TheQuantumPhysicist Aug 8, 2023
c5453bd
Minor
TheQuantumPhysicist Aug 8, 2023
e085f35
Use generic instead of AnyConnection
TheQuantumPhysicist Aug 8, 2023
3b27bd3
create_tables member function in SqlxStorage
TheQuantumPhysicist Aug 8, 2023
5ce1b00
Simplify lifetimes in SqlxStorage first function
TheQuantumPhysicist Aug 8, 2023
4f73902
Handle error in SqlxStorage's first function
TheQuantumPhysicist Aug 8, 2023
ff3b84d
Add sqlite in-memory construction of SqlxStorage
TheQuantumPhysicist Aug 8, 2023
c682fa0
More improvements to sqlx storage implementation and tests
TheQuantumPhysicist Aug 9, 2023
b8643ed
Simplify create_tables
TheQuantumPhysicist Aug 9, 2023
865ac49
Minor
TheQuantumPhysicist Aug 9, 2023
b587c02
Remove some temporary unwraps
TheQuantumPhysicist Aug 9, 2023
09d8bb3
Remove some pub qualifiers
TheQuantumPhysicist Aug 9, 2023
6d71f00
Remove more pub qualifiers
TheQuantumPhysicist Aug 9, 2023
0d8cfce
Rename ApiStorageError to ApiServerStorageError
TheQuantumPhysicist Aug 10, 2023
fe9c4d1
Refactoring and renames
TheQuantumPhysicist Aug 10, 2023
e26ade0
Added sqlx storage functions to set/get block height vs id and improv…
TheQuantumPhysicist Aug 10, 2023
c55031c
Added sqlx storage functions to set/get block height vs id and improv…
TheQuantumPhysicist Aug 10, 2023
93467ed
Add blocks table and get/set blocks for sqlx
TheQuantumPhysicist Aug 10, 2023
3631472
Add set/get transactions and the sql table to sqlx implementation of …
TheQuantumPhysicist Aug 11, 2023
057621a
Rename storage api to ApiServerStorageRead/Write
TheQuantumPhysicist Aug 11, 2023
dac9dbe
Make block id optional when setting a transaction in the api server s…
TheQuantumPhysicist Aug 11, 2023
f93e203
Add table for block auxiliary data + tests + some refactoring
TheQuantumPhysicist Aug 11, 2023
89f7dc1
Prefix all sql tables with ml_
TheQuantumPhysicist Aug 11, 2023
7e1e67a
Add set/get best block with tests to sqlx impls + tests
TheQuantumPhysicist Aug 11, 2023
5ca883f
Use &str instead of string in misc_data table
TheQuantumPhysicist Aug 11, 2023
587057e
Basic transaction wrappers (incomplete)
TheQuantumPhysicist Aug 11, 2023
b40c093
Factor out queries and generalize over database executors
TheQuantumPhysicist Aug 22, 2023
47fb49c
Clean up trait bounds in queries
TheQuantumPhysicist Aug 22, 2023
b818453
Get rid of a temporary unwrap
TheQuantumPhysicist Aug 22, 2023
ccc2f0b
Add license to queries.rs
TheQuantumPhysicist Aug 22, 2023
99a18ab
More cleanup for trait bounds
TheQuantumPhysicist Aug 22, 2023
4645d0f
Abstract is_initialized_internal() into queries for sqlx
TheQuantumPhysicist Aug 22, 2023
5e9c3ca
Copy shallow functions to transaction implementations
TheQuantumPhysicist Aug 22, 2023
0ab30dc
First working transactional tests for sqlx
TheQuantumPhysicist Aug 23, 2023
dbe7b02
Add more tests for transactional storage in sqlx
TheQuantumPhysicist Aug 23, 2023
f498bc5
Use sqlx instead of previously-used in-memory storage that uses maps …
TheQuantumPhysicist Aug 23, 2023
ac38993
Add ChainConfig to sqlx database initialization
TheQuantumPhysicist Aug 23, 2023
8ae4a35
First successful sync with sqlx
TheQuantumPhysicist Aug 23, 2023
85a94bf
Minor refactor
TheQuantumPhysicist Aug 24, 2023
497db50
Remove unnecessary reference in function call
TheQuantumPhysicist Sep 1, 2023
429a670
Exclude a wasm file from trailing-space checks
TheQuantumPhysicist Sep 1, 2023
23f88c2
Added API Server Daemon config
alfiedotwtf Aug 30, 2023
4d1bf7a
Added API Server Daemon convenience error handling
alfiedotwtf Aug 30, 2023
93976e3
Added API Server Daemon example state struct to later hold database h…
alfiedotwtf Aug 30, 2023
e5a552b
Added fleshing out of the API Server Daemon v1 endpoints
alfiedotwtf Aug 30, 2023
c585e68
Rename API Server Daemon to API Server Web Server for crate consistency
alfiedotwtf Aug 30, 2023
7a319ea
Clean up cargo files
alfiedotwtf Sep 1, 2023
8c5e12c
Minor cleanup
alfiedotwtf Sep 1, 2023
097705b
Use default constants from the node
alfiedotwtf Sep 1, 2023
a19b57e
Abstract out duplicate code into macros
alfiedotwtf Sep 1, 2023
3f48113
Reinstate function from macro as it was over-complicating things
alfiedotwtf Sep 4, 2023
aa376f8
Removing mut and shadowing instead for better footgun producction
alfiedotwtf Sep 4, 2023
9356098
Prefix rather than import logging namespace
alfiedotwtf Sep 4, 2023
e25728d
Lift pub(crate) function into a static function
alfiedotwtf Sep 4, 2023
68772b8
Add standard copyright comment
alfiedotwtf Sep 4, 2023
1fb3f01
Fix do_checks
alfiedotwtf Sep 4, 2023
58bb71a
Remove macro to reduce future complexity
alfiedotwtf Sep 4, 2023
90715c8
Undo unnecessary moving of function calls
TheQuantumPhysicist Sep 4, 2023
16a2630
Remove unnecessary impl separator
TheQuantumPhysicist Sep 4, 2023
1f5b332
Remove outdated comment
TheQuantumPhysicist Sep 4, 2023
e675bfa
Marked rollback() as unimplemented
alfiedotwtf Sep 11, 2023
4488ff8
Removed unneeded code block
alfiedotwtf Sep 11, 2023
751179d
Factored out bounds to outer impl
alfiedotwtf Sep 11, 2023
27da784
Add codechecks to gitlab CI
TheQuantumPhysicist Sep 11, 2023
8678821
Add python3 toml package to gitlab ci
TheQuantumPhysicist Sep 11, 2023
44a0925
Merge branch 'feat/api_server' into 'master'
TheQuantumPhysicist Sep 11, 2023
f28060d
Downgrade required rust version to make it work on github CI
TheQuantumPhysicist Sep 11, 2023
91793b5
Add CI dependencies
TheQuantumPhysicist Sep 12, 2023
eb12af3
Move build commands to the right place
TheQuantumPhysicist Sep 12, 2023
c718c19
Update dashmap as per the request of cargo-deny
TheQuantumPhysicist Sep 12, 2023
5c75b51
Add dependencies for clippy in github CI
TheQuantumPhysicist Sep 12, 2023
817ec8b
Update nightly version of coverage in github CI
TheQuantumPhysicist Sep 12, 2023
03b8a9c
Add coverage dependencies in CI
TheQuantumPhysicist Sep 12, 2023
774e18c
Change nightly version as there is an internal compiler error in cove…
TheQuantumPhysicist Sep 12, 2023
15b5365
Another attempt to change the coverage nightly version
TheQuantumPhysicist Sep 12, 2023
415d70c
Disable wallet functional tests temporarily due to github CI issues
TheQuantumPhysicist Sep 13, 2023
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
8 changes: 5 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: build
on:
push:
branches:
- '**' # target all branches
- "**" # target all branches
pull_request:
branches:
- master
Expand All @@ -14,7 +14,6 @@ env:
RUST_BACKTRACE: full

jobs:

rustfmt:
runs-on: ubuntu-latest
steps:
Expand All @@ -23,6 +22,8 @@ jobs:
with:
concurrent_skipping: "same_content_newer"
skip_after_successful_duplicate: "true"
- name: Install dependencies
run: sudo apt-get install -yqq --no-install-recommends build-essential libgtk-3-dev python3 python3-toml
- uses: actions/checkout@v2
- name: Install rust stable
uses: actions-rs/toolchain@v1
Expand Down Expand Up @@ -82,6 +83,8 @@ jobs:
with:
concurrent_skipping: "same_content_newer"
skip_after_successful_duplicate: "true"
- name: Install dependencies
run: sudo apt-get install -yqq --no-install-recommends build-essential libgtk-3-dev python3 python3-toml
- uses: actions/checkout@v2
- name: Install rust stable
uses: actions-rs/toolchain@v1
Expand Down Expand Up @@ -142,4 +145,3 @@ jobs:
with:
name: macos-functional-test-artifacts
path: target/tmp

7 changes: 5 additions & 2 deletions .github/workflows/code_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ jobs:
with:
concurrent_skipping: "same_content_newer"
skip_after_successful_duplicate: "true"
- name: Install dependencies
run: sudo apt-get install -yqq --no-install-recommends build-essential libgtk-3-dev python3 python3-toml
- uses: actions/checkout@v1
- run: rustup component add clippy

Expand All @@ -27,6 +29,7 @@ jobs:
args: >
--all-features --workspace --all-targets --
-D warnings
-A clippy::unnecessary_literal_unwrap
-A clippy::new_without_default
-A unknown_lints
-W clippy::implicit_saturating_sub
Expand Down Expand Up @@ -62,8 +65,8 @@ jobs:
concurrent_skipping: "same_content_newer"
skip_after_successful_duplicate: "true"
- uses: actions/checkout@v1
- run: pip install -r ./.github/scripts/requirements.txt
- run: ./.github/scripts/codecheck.py
- run: pip install -r ./build-tools/codecheck/requirements.txt
- run: ./build-tools/codecheck/codecheck.py

cargo_deny_checks:
name: Cargo deny check licenses and advisories
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
on:
push:
branches:
- '**' # target all branches
- "**" # target all branches
pull_request:
branches:
- master
Expand All @@ -17,11 +17,13 @@ jobs:
with:
concurrent_skipping: "same_content_newer"
skip_after_successful_duplicate: "true"
- name: Install dependencies
run: sudo apt-get install -yqq --no-install-recommends build-essential libgtk-3-dev python3 python3-toml
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
# TODO: Inspect coverage, and change toolchain to stable
toolchain: nightly-2023-04-10
toolchain: nightly-2023-08-01
override: true
- uses: actions-rs/cargo@v1
with:
Expand All @@ -34,12 +36,11 @@ jobs:
RUST_LOG: debug
RUST_BACKTRACE: full
CARGO_INCREMENTAL: 0
RUSTFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests'
RUSTDOCFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests'
RUSTFLAGS: "-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests"
RUSTDOCFLAGS: "-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests"
- id: coverage
uses: actions-rs/grcov@v0.1
- uses: actions/upload-artifact@v2
with:
name: code-coverage-report
path: ${{ steps.coverage.outputs.report }}

78 changes: 78 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
image: "rust:latest"

stages:
- build_clean
- test_fmt
- code_checks
- test_clippy
- test_cargo
- build_cargo
- test_cargo_deny
- test_functional
- test_sighash

variables:
RUST_LOG: debug
RUST_BACKTRACE: full

# Create a random path to avoid collisions
GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_PIPELINE_ID/mintlayer-core

workflow:
rules:
- if: $CI_PIPELINE_SOURCE == "web"
- if: $CI_PIPELINE_SOURCE == "merge_request_event"

before_script:
- apt-get update -yqq
- apt-get install -yqq --no-install-recommends build-essential libgtk-3-dev python3 python3-toml

build:clean:
stage: build_clean
script:
- rm -rf target

test:fmt:
stage: test_fmt
script:
- rustup component add rustfmt
- cargo fmt --all -- --check

test:code_checks:
stage: code_checks
script:
- ./build-tools/codecheck/codecheck.py

test:clippy:
stage: test_clippy
script:
- rustup component add clippy
- cargo clippy --all-features --workspace --all-targets -- -D warnings -A clippy::unnecessary_literal_unwrap -A clippy::new_without_default -W clippy::implicit_saturating_sub -W clippy::implicit_clone -W clippy::map_unwrap_or -W clippy::unnested_or_patterns -W clippy::manual_assert -W clippy::unused_async -W clippy::mut_mut -W clippy::todo
- cargo clippy --all-features --workspace --lib --bins --examples -- -A clippy::all -D clippy::float_arithmetic -W clippy::unwrap_used -W clippy::dbg_macro -W clippy::items_after_statements -W clippy::fallible_impl_from -W clippy::string_slice

test:cargo:
stage: test_cargo
script:
- rustc --version && cargo --version
- cargo test --release --all --workspace --verbose

build:cargo:
stage: build_cargo
script:
- cargo build --release --all --locked

test:cargo_deny:
stage: test_cargo_deny
script:
- cargo install cargo-deny
- cargo deny check advisories licenses

test:func:
stage: test_functional
script:
- cargo test --release -p mintlayer-test --test functional -- --ignored

test:sighash:
stage: test_sighash
script:
- cargo test --release -p common mixed_sighash_types -- --ignored
1 change: 1 addition & 0 deletions .gitlab/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @muursh @TheQuantumPhysicist @erubboli
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@

If you want to contribute but have no idea what to start working on, feel free to check the [issues](https://github.com/mintlayer/mintlayer-core/issues) or grep for "TODO" in the code. If you have a proposal for a major change or feature that we haven't outlined before, the best idea would be to open an issue or pull request to discuss the idea before you delve too deeply into it, as there may be a good reason we haven't gone that route before.

If you find a security issue, please follow the guide [here](https://github.com/mintlayer/mintlayer-core/security/policy) to report it.
If you find a security issue, please follow the guide [here](https://github.com/mintlayer/mintlayer-core/security/policy) to report it.

## External contributors

First and foremost, you should make sure you have [rust installed](https://www.rust-lang.org/tools/install). As a rule, we use the latest stable version of rust that is available; if this changes, we'll be sure to update this note.

As an outside contributor, your first step will be to fork the repo and create your own copy. You can't push to our repo directly, so without doing this, it won't be possible to contribute any code. Your contributions should be put in a logically named branch in your fork. If you're not sure what I mean by that, take a look at the extant branches in our repo, and you'll see some examples. If you have several significant changes to make that don't logically fit together, then multiple branches and pull requests are the way to go.
As an outside contributor, your first step will be to fork the repo and create your own copy. You can't push to our repo directly, so without doing this, it won't be possible to contribute any code. Your contributions should be put in a logically named branch in your fork. If you're not sure what I mean by that, take a look at the extant branches in our repo, and you'll see some examples. If you have several significant changes to make that don't logically fit together, then multiple branches and pull requests are the way to go.

As you make your changes, ensure the code is as clean as possible and well documented so that it's clear to us what you're up to when we review it and it is thoroughly tested. Make sure that the old tests still pass, as well as any tests you've added. We will only merge code with all the tests passing in CI.
As you make your changes, ensure the code is as clean as possible and well documented so that it's clear to us what you're up to when we review it and it is thoroughly tested. Make sure that the old tests still pass, as well as any tests you've added. We will only merge code with all the tests passing in CI.

## Internal contributors

Expand Down
Loading
Loading