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

Collection of PRs that require UI update #1512

Draft
wants to merge 260 commits into
base: dev
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
260 commits
Select commit Hold shift + click to select a range
be4a40f
Merge branch 'dev' of github.com:SiaFoundation/renterd into pj/settings
peterjan Aug 28, 2024
2cadb86
bus: merge objects listing endpoints and add new endpoint to fetch ob…
ChrisSchinnerl Aug 28, 2024
fe1564f
bus: fix jape
ChrisSchinnerl Aug 28, 2024
f43d5d7
stores: add compat code
peterjan Aug 29, 2024
0e43e8d
all: update docs and defaults
peterjan Aug 29, 2024
8c76a21
all: cleanup PR
peterjan Aug 29, 2024
36a8d70
stores: fix TestListObject tests
ChrisSchinnerl Aug 29, 2024
c45aa0b
all: cleanup PR
peterjan Aug 29, 2024
7d7257b
sql: combine ObjectEntries and ListObjects in interface
ChrisSchinnerl Aug 29, 2024
54b3d34
api: get rid of setting constants
peterjan Aug 29, 2024
ed16790
testing: fix TestPinManager
peterjan Aug 29, 2024
d320faf
bus: make prefix path param
ChrisSchinnerl Aug 29, 2024
45ad777
e2e: fix TestUploadDownloadExtended
ChrisSchinnerl Aug 29, 2024
f21c2cb
testing: fix race in TestPinManager
peterjan Aug 29, 2024
d4e4e01
bus: make prefix a mandatory arg
ChrisSchinnerl Aug 29, 2024
b0e7152
e2e: fix TestUploadDownloadSpending
ChrisSchinnerl Aug 29, 2024
2161db9
bus: rename objects to listobjects endpoint
ChrisSchinnerl Aug 29, 2024
d9da07c
Merge branch 'dev' into chris/objects-endpoints-v2
ChrisSchinnerl Aug 29, 2024
b414531
bus: remove ApplyValues
ChrisSchinnerl Aug 30, 2024
88e13f9
bus: add substring parameter to Objects endpoint
ChrisSchinnerl Aug 30, 2024
94a840b
Merge branch 'dev' of github.com:SiaFoundation/renterd into pj/settings
peterjan Sep 3, 2024
783be49
Merge branch 'dev' into chris/objects-endpoints-v2
ChrisSchinnerl Sep 3, 2024
35e1345
config: remove deprecated fields
peterjan Sep 3, 2024
b2c5eef
stores: unmarshal in store
peterjan Sep 3, 2024
8a8e783
gouging: change gouging settings to base unit
ChrisSchinnerl Sep 3, 2024
1c4648d
settings: update store
peterjan Sep 3, 2024
0e49a7c
e2e: fix TestGouging
ChrisSchinnerl Sep 3, 2024
bd4d1c8
wallet: remove before and since wallet txn options
peterjan Sep 3, 2024
dc3580b
stores: add migrations
ChrisSchinnerl Sep 3, 2024
36a73db
testing: fix setting key
peterjan Sep 3, 2024
df0301d
Merge branch 'dev' into chris/gouging-base-units
ChrisSchinnerl Sep 3, 2024
51a4669
bus: remove /search/hosts
peterjan Sep 3, 2024
8f268f9
Merge branch 'dev' into pj/settings
peterjan Sep 3, 2024
f4ce1d0
Merge branch 'dev' into pj/deprecation-todos
peterjan Sep 4, 2024
c10131b
Merge branch 'dev' into chris/wallet-api-v2
ChrisSchinnerl Sep 4, 2024
e6d837c
bus: fix analyse
ChrisSchinnerl Sep 4, 2024
f52d649
Merge branch 'dev' into chris/wallet-api-v2
ChrisSchinnerl Sep 4, 2024
6b46624
e2e: fix TestWalletEvents
ChrisSchinnerl Sep 4, 2024
4347a87
e2e: fix TestWallet
ChrisSchinnerl Sep 4, 2024
5d35cb0
e2e: fix TestWalletRedistribute
ChrisSchinnerl Sep 4, 2024
b6d738f
bus: address comments
ChrisSchinnerl Sep 4, 2024
1debed9
api: call object name's 'key' instead of 'path' or 'name'
ChrisSchinnerl Sep 4, 2024
621ed2b
stores: soft delete contracts
peterjan Sep 5, 2024
007f8ff
Merge branch 'dev' of github.com:SiaFoundation/renterd into pj/settings
peterjan Sep 5, 2024
0161496
Merge branch 'pj/settings' of github.com:SiaFoundation/renterd into p…
peterjan Sep 5, 2024
3a69b90
Merge branch 'dev' of github.com:SiaFoundation/renterd into pj/remove…
peterjan Sep 5, 2024
7c23b18
readme: update
ChrisSchinnerl Sep 5, 2024
1b70b11
Merge branch 'pj/deprecation-todos' into chris/wallet-api-v2
ChrisSchinnerl Sep 5, 2024
f5d0ab1
Merge branch 'dev' of github.com:SiaFoundation/renterd into pj/remove…
peterjan Sep 5, 2024
a09f927
autopilot: remove /hosts route
ChrisSchinnerl Sep 5, 2024
434e11f
autopilot: fix jape check
ChrisSchinnerl Sep 5, 2024
87806f4
Merge branch 'dev' into chris/objects-endpoints-v2
ChrisSchinnerl Sep 5, 2024
b7f2f7d
stores: remove FK between contracts and hosts
peterjan Sep 5, 2024
41e3294
api: add includeArchived to api.ContractsOpts
peterjan Sep 5, 2024
2e5fce4
Merge branch 'dev' of github.com:SiaFoundation/renterd into pj/contra…
peterjan Sep 5, 2024
017ccb1
stores: fix TODO
peterjan Sep 5, 2024
3934a8f
stores: debug logging
ChrisSchinnerl Sep 5, 2024
0ab35a8
stores: remove logging
ChrisSchinnerl Sep 5, 2024
8996de5
stores: get rid of download_spending
peterjan Sep 5, 2024
fdbb15e
stores: rename total_cost
peterjan Sep 5, 2024
842a66a
Merge branch 'dev' into chris/gouging-base-units
ChrisSchinnerl Sep 5, 2024
85a6c80
stores: rename list to sector roots
peterjan Sep 5, 2024
08deaf3
all: cleanup PR
peterjan Sep 5, 2024
b4a4e25
stores: update migrations
peterjan Sep 5, 2024
0e1a2ec
stores: update SQLite migration
peterjan Sep 5, 2024
2cab31c
all: rename pin setting
peterjan Sep 5, 2024
3f82d0b
stores: move migration
peterjan Sep 6, 2024
f2ba95a
sql: add index for db_directory_id column in SQLite
ChrisSchinnerl Sep 6, 2024
7fd0986
bus: add explorer section to config
peterjan Sep 6, 2024
7fbdaa6
Merge branch 'dev' of github.com:SiaFoundation/renterd into pj/contra…
peterjan Sep 6, 2024
c831617
Merge branch 'pj/explorer-config' of github.com:SiaFoundation/renterd…
peterjan Sep 6, 2024
829e6bf
sql: fix migration
peterjan Sep 6, 2024
8aa18a0
db: update migration
peterjan Sep 6, 2024
e80d17f
Merge branch 'dev' into chris/gouging-base-units
ChrisSchinnerl Sep 6, 2024
b47b078
bus: remove Enabled from pinned settings
peterjan Sep 6, 2024
264a5ed
Merge branch 'api-breakers' into chris/wallet-api-v2
ChrisSchinnerl Sep 6, 2024
568c58f
Remove some deprecated code and address some v2 API changes (#1478)
ChrisSchinnerl Sep 6, 2024
b706cbf
Merge branch 'api-breakers' of github.com:SiaFoundation/renterd into …
peterjan Sep 6, 2024
8de033d
bus: move explorer to internal
peterjan Sep 6, 2024
075d5b7
Deprecate `/hosts` in favour of `/search/hosts` (#1484)
ChrisSchinnerl Sep 6, 2024
a564454
Merge branch 'api-breakers' into chris/objects-endpoints-v2
ChrisSchinnerl Sep 6, 2024
6b8d269
bus: remove Explorer interface
ChrisSchinnerl Sep 6, 2024
8c27676
testing: remove test logger
peterjan Sep 6, 2024
49d0107
Merge branch 'api-breakers' of github.com:SiaFoundation/renterd into …
peterjan Sep 6, 2024
9df8aab
Merge branch 'pj/explorer-config' of github.com:SiaFoundation/renterd…
peterjan Sep 6, 2024
ca1c077
stores: use bool
peterjan Sep 6, 2024
4f4a9c4
sql: add support for filtering by price table and settings fields
ChrisSchinnerl Sep 6, 2024
2f2d515
sql: fix test in MySQL
ChrisSchinnerl Sep 6, 2024
5f63ac8
Add explorer section to config (#1502)
ChrisSchinnerl Sep 6, 2024
1233d54
Merge objects endpoints (#1493)
ChrisSchinnerl Sep 6, 2024
d1609fb
Merge branch 'api-breakers' into chris/autopilot-hosts
ChrisSchinnerl Sep 6, 2024
db4a7e4
bus: fix sortBy check
ChrisSchinnerl Sep 6, 2024
43f9779
e2e: fix TestListObjectsWithDelimiterSlash
ChrisSchinnerl Sep 6, 2024
863f876
api: add IsValidHostSortBy helper
ChrisSchinnerl Sep 6, 2024
fe695fa
stores: remove explorer enabled check
peterjan Sep 9, 2024
e4ed9e6
sql: swap migrations
ChrisSchinnerl Sep 9, 2024
1d576bc
testing: fix TestPinManager NDF
peterjan Sep 9, 2024
51d35ee
gouging: address review comments
ChrisSchinnerl Sep 9, 2024
c8980ae
Merge branch 'api-breakers' into chris/gouging-base-units
ChrisSchinnerl Sep 9, 2024
c439b8b
bus: handle updatePinnedSettings error
ChrisSchinnerl Sep 9, 2024
a2b7da3
Merge branch 'chris/gouging-base-units' of github.com:SiaFoundation/r…
ChrisSchinnerl Sep 9, 2024
d1fe477
bus: increase sleep in updatPinnedSettings
ChrisSchinnerl Sep 9, 2024
197e691
stores: don't filter
ChrisSchinnerl Sep 9, 2024
90399de
bus: rename key to encryptionkey for slabs
ChrisSchinnerl Sep 10, 2024
bcbeda8
bus: fill in Relevant field of Event response
ChrisSchinnerl Sep 10, 2024
525a298
e2e: extend TestWalletEvents
ChrisSchinnerl Sep 10, 2024
002a78e
stores: use metadata for insert/updating contracts
peterjan Sep 10, 2024
d1ea979
stores: add PutContract
peterjan Sep 10, 2024
d8d8d4c
stores: update migration
peterjan Sep 10, 2024
bd1c083
testing: fix TestUnconfirmedContractArchival
peterjan Sep 10, 2024
8964f7f
testing: fix TestHostPruning
peterjan Sep 10, 2024
e082fdf
stores: use raw SQL in the migration
peterjan Sep 10, 2024
dafe545
stores: cleanup migration
peterjan Sep 10, 2024
21dc3f5
Merge branch 'dev' into pj/contract-soft-delete
peterjan Sep 10, 2024
1ff7805
api: remove created at on api.ContractMetadata
peterjan Sep 11, 2024
6e06edf
Merge branch 'pj/contract-soft-delete' of github.com:SiaFoundation/re…
peterjan Sep 11, 2024
030b075
db: fix migration
peterjan Sep 11, 2024
ac8a663
stores: fix SQLite migratiton
ChrisSchinnerl Sep 11, 2024
41e1128
Update gouging settings API to accept base unit (#1505)
ChrisSchinnerl Sep 11, 2024
a60225b
stores: address comments
ChrisSchinnerl Sep 11, 2024
be0102e
stores: remove some sorting options on pricetables
ChrisSchinnerl Sep 11, 2024
7dc4831
stores: add decimal cast
ChrisSchinnerl Sep 11, 2024
360d665
stores: remove sorting
ChrisSchinnerl Sep 11, 2024
b1ab76c
Revert "stores: remove sorting"
ChrisSchinnerl Sep 11, 2024
238e150
Merge branch 'dev' of github.com:SiaFoundation/renterd into pj/contra…
peterjan Sep 11, 2024
1f4d426
stores: remove default settings
peterjan Sep 11, 2024
458d37d
Merge branch 'dev' of github.com:SiaFoundation/renterd into pj/settings
peterjan Sep 11, 2024
7dc649a
Merge branch 'api-breakers' of github.com:SiaFoundation/renterd into …
peterjan Sep 11, 2024
cfead9a
Rename slabs keys to match other encryption keys in api (#1519)
ChrisSchinnerl Sep 11, 2024
62dbcd6
stores: fix indentation
peterjan Sep 11, 2024
43e2231
Fill in Relevant field of Event response (#1520)
ChrisSchinnerl Sep 12, 2024
b622402
api: add 'score' back to host check
ChrisSchinnerl Sep 12, 2024
4dd0b57
config: fix typo
peterjan Sep 12, 2024
8f112ce
Merge branch 'api-breakers' of github.com:SiaFoundation/renterd into …
peterjan Sep 12, 2024
87f0cc2
bus: remove network
peterjan Sep 12, 2024
ceed290
api: remove unused types
ChrisSchinnerl Sep 12, 2024
a4d3cc6
api: fix json field conflict
ChrisSchinnerl Sep 12, 2024
f4d8788
wallet: add scanheight to wallet response
ChrisSchinnerl Sep 12, 2024
fc5efe5
Use strong setting types (#1490)
ChrisSchinnerl Sep 12, 2024
8b13d2b
Merge branch 'api-breakers' into chris/autopilot-hosts
ChrisSchinnerl Sep 12, 2024
9247301
Merge branch 'api-breakers' into chris/idx-db-directory-id
ChrisSchinnerl Sep 12, 2024
d9c500b
Add index for db_directory_id column in SQLite (#1511)
ChrisSchinnerl Sep 12, 2024
0a29866
Revert "Revert "stores: remove sorting""
ChrisSchinnerl Sep 12, 2024
a42b212
Remove host endpoints from autopilot (#1508)
ChrisSchinnerl Sep 12, 2024
6d1f5e3
Add `scanHeight` to wallet response (#1528)
ChrisSchinnerl Sep 13, 2024
90b7a35
api: add bucket to object metadata
peterjan Sep 14, 2024
371f3fc
bus: remove objects by slab key
peterjan Sep 14, 2024
33f01c0
stores: make bucket optional
peterjan Sep 15, 2024
23646fb
bus: add slab encryption key to list object options
peterjan Sep 15, 2024
e84274b
Merge branch 'dev' into api-breakers
ChrisSchinnerl Sep 16, 2024
ccd9250
worker: move migration alert
peterjan Sep 16, 2024
2ad292b
worker: debug log migration result
peterjan Sep 16, 2024
dc8f9b9
stores: fix only_full_group_by
peterjan Sep 16, 2024
ec19408
stores: fix only_full_group_by
peterjan Sep 16, 2024
313ae88
testing: fix TestMigrations
peterjan Sep 16, 2024
b871983
autopilot: add id to autopilot state response
ChrisSchinnerl Sep 16, 2024
5e58468
Merge branch 'api-breakers' into chris/host-check-json
ChrisSchinnerl Sep 16, 2024
61ab464
Add overall 'score' to `HostCheck` response type (#1527)
ChrisSchinnerl Sep 16, 2024
2e93996
Merge branch 'api-breakers' of github.com:SiaFoundation/renterd into …
peterjan Sep 16, 2024
f64f779
stores: remove check
peterjan Sep 17, 2024
898dc64
stores: fix migration
peterjan Sep 17, 2024
c9a3e2b
db: fix MySQL migration
peterjan Sep 17, 2024
da9c6a9
Expose host errors in migration alerts (#1526)
ChrisSchinnerl Sep 17, 2024
e4109d2
db: allow empty migration
peterjan Sep 17, 2024
633ab85
Allow empty migrations (#1537)
ChrisSchinnerl Sep 17, 2024
ee2b63e
bus: remove hosts for scanning endpoint
peterjan Sep 12, 2024
5af724b
bus,worker: update object endpoints
peterjan Sep 17, 2024
ba60fea
stores: remove list prefix
peterjan Sep 17, 2024
ac978bc
testing: rename
peterjan Sep 17, 2024
5926d34
Merge branch 'api-breakers' of github.com:SiaFoundation/renterd into …
peterjan Sep 17, 2024
7055fec
worker: add RemoveObjects to client
peterjan Sep 17, 2024
6f099c4
stores: add TestListObjectsSlabEncryptionKey
peterjan Sep 17, 2024
4665082
Merge branch 'pj/list-by-slab-key' of github.com:SiaFoundation/renter…
peterjan Sep 17, 2024
723f15b
Merge branch 'api-breakers' of github.com:SiaFoundation/renterd into …
peterjan Sep 17, 2024
73ca54a
api: remove default bucket
ChrisSchinnerl Sep 17, 2024
3943575
stores: fix TestPrunableContractRoots
ChrisSchinnerl Sep 17, 2024
03c0c48
stores: fix TestBuckets
ChrisSchinnerl Sep 17, 2024
ae0a80d
stores: fix TestPartialSlab
ChrisSchinnerl Sep 17, 2024
b1e4147
e2e: fix TestListObjectsWithNoDelimiter
ChrisSchinnerl Sep 17, 2024
8c7a0d1
api: address comment
ChrisSchinnerl Sep 17, 2024
7690380
Merge branch 'api-breakers' into pj/list-by-slab-key
ChrisSchinnerl Sep 17, 2024
e12103b
Merge branch 'api-breakers' into pj/contract-soft-delete
ChrisSchinnerl Sep 17, 2024
00dff0b
bus: make 'bucket' optinoal in objectsHandlerGet
ChrisSchinnerl Sep 17, 2024
22956b5
Update list object options, add slab encryption key and make bucket o…
ChrisSchinnerl Sep 17, 2024
5f6d8a8
stores: re-add TestRenewedContract
peterjan Sep 17, 2024
beaf392
Merge branch 'pj/contract-soft-delete' of github.com:SiaFoundation/re…
peterjan Sep 17, 2024
05269d6
bus: populate autopilots
peterjan Sep 16, 2024
3fbabb9
stores: fix migration
peterjan Sep 16, 2024
4a6b526
bus: remove warning logs
peterjan Sep 16, 2024
c9f882d
testing: do not set pinned settings in newTestCluster
peterjan Sep 17, 2024
fd90a07
Add soft deletion for contracts (#1509)
ChrisSchinnerl Sep 17, 2024
d327798
Merge branch 'dev' into api-breakers
ChrisSchinnerl Sep 18, 2024
a037bfb
ui: v0.62.0
ChrisSchinnerl Sep 18, 2024
bd26046
Merge branch 'api-breakers' into pj/object-routes
ChrisSchinnerl Sep 18, 2024
5abf932
Update object endpoints (#1539)
ChrisSchinnerl Sep 18, 2024
70fff9b
autopilot: make sure scanner finishes one batch before starting the n…
ChrisSchinnerl Sep 18, 2024
b2bce27
scanner: fix TestScanner
ChrisSchinnerl Sep 18, 2024
8ce019e
scanner: abort on shutdown
ChrisSchinnerl Sep 19, 2024
e719cce
autopilot: interrupt on ctx
ChrisSchinnerl Sep 20, 2024
2a80c39
autopilot: debug logging
ChrisSchinnerl Sep 20, 2024
42ff6ea
autopilot: more logging
ChrisSchinnerl Sep 20, 2024
0a5b2af
debug: more logging
ChrisSchinnerl Sep 20, 2024
b912be0
autopilot: remove debug logging
ChrisSchinnerl Sep 20, 2024
dd316d2
test.yml: run all tests again
ChrisSchinnerl Sep 20, 2024
1f853f9
db: fix migration_00021_archived_contracts
peterjan Sep 23, 2024
ff7efa1
db: fix migration_0004_contract_spending
peterjan Sep 23, 2024
8a69497
Merge branch 'dev' into api-breakers
ChrisSchinnerl Sep 24, 2024
112f297
stores: remove triggers
ChrisSchinnerl Sep 24, 2024
9a4e6a3
sql: add migration to migrations list
ChrisSchinnerl Sep 24, 2024
915b2a8
bus: remove deprecated alerts logic
peterjan Sep 24, 2024
e18aad3
bus: use offset limit consistently
peterjan Sep 24, 2024
b426c05
bus: remove handler
peterjan Sep 24, 2024
9da43e5
Merge branch 'pj/remove-deprecated-alerts-logic' of github.com:SiaFou…
peterjan Sep 24, 2024
826e310
bus: fix missing returns
peterjan Sep 24, 2024
1338df2
bus: remove deprecated alerts logic
peterjan Sep 24, 2024
4395453
Merge branch 'api-breakers' of github.com:SiaFoundation/renterd into …
peterjan Sep 25, 2024
85b655e
worker: do not escape bucket name
peterjan Sep 24, 2024
999a541
go.mod: update ui dependency
ChrisSchinnerl Sep 26, 2024
3fb4cc2
Merge branch 'dev' into api-breakers
ChrisSchinnerl Sep 26, 2024
9e0643c
stores: remove contractTables
ChrisSchinnerl Sep 26, 2024
4612492
object: move implementation to encryptionkey.go
ChrisSchinnerl Sep 20, 2024
676c7a7
implement encrypt and decrypt on EncryptionKey
ChrisSchinnerl Sep 23, 2024
acea5a7
worker: fix unit tests
ChrisSchinnerl Sep 24, 2024
60e7d08
stores: update encryption key persistence
ChrisSchinnerl Sep 24, 2024
ffbbd4d
stores: fix TestSlabCleanup
ChrisSchinnerl Sep 25, 2024
5fd345f
worker: derive key
ChrisSchinnerl Sep 25, 2024
cc047a9
stores: add migration
ChrisSchinnerl Sep 25, 2024
1fbbc22
object: address comments
ChrisSchinnerl Sep 26, 2024
6d3ddeb
sql: fix mysql migration
ChrisSchinnerl Sep 26, 2024
cc93943
config: default to human readable encoding
ChrisSchinnerl Sep 25, 2024
d55182d
Merge branch 'api-breakers' into pj/offset-limit
ChrisSchinnerl Sep 28, 2024
d496489
bus: use lowercase query string params
peterjan Sep 25, 2024
e830df7
testing: remove debug line
peterjan Sep 25, 2024
a9971b6
worker: remove check
peterjan Sep 27, 2024
cb0d4aa
Merge branch 'api-breakers' into pj/offset-limit
ChrisSchinnerl Sep 28, 2024
ea7682e
Use `offset` and `limit` parameters consistently (#1574)
ChrisSchinnerl Sep 28, 2024
8dc1634
add prometheus encoder
chris124567 Sep 30, 2024
7abd1e2
add old PrometheusMetrics
chris124567 Sep 30, 2024
6577649
bus: fix superfluous response.WriteHeader call
peterjan Oct 1, 2024
9009604
bus: return 404 on host not found
peterjan Oct 1, 2024
cd38716
fixes for type changes
chris124567 Oct 1, 2024
b563366
update routes
chris124567 Oct 1, 2024
47327ad
add api/utils.go
chris124567 Oct 1, 2024
2db484d
fix lint
chris124567 Oct 1, 2024
e52902d
add MarshalJSON on marshallerSlice
chris124567 Oct 2, 2024
d41d26b
Return 404 when host is not found (#1598)
ChrisSchinnerl Oct 2, 2024
1744b9d
Fix superfluous response.WriteHeader call (#1596)
ChrisSchinnerl Oct 2, 2024
181e343
rearrange order in Host metric list
chris124567 Oct 2, 2024
ad38176
Merge branch 'api-breakers' into add-prometheus
chris124567 Oct 2, 2024
b4e3df9
Prometheus encoding (#1525)
n8maninger Oct 3, 2024
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: 4 additions & 4 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,10 @@ body:
description: |
The configuration of your bus
```bash
curl -u ":[YOUR_PASSWORD]" http://localhost:9980/api/bus/setting/contractset
curl -u ":[YOUR_PASSWORD]" http://localhost:9980/api/bus/setting/gouging
curl -u ":[YOUR_PASSWORD]" http://localhost:9980/api/bus/setting/redundancy
curl -u ":[YOUR_PASSWORD]" http://localhost:9980/api/bus/setting/uploadpacking
curl -u ":[YOUR_PASSWORD]" http://localhost:9980/api/bus/settings/gouging
curl -u ":[YOUR_PASSWORD]" http://localhost:9980/api/bus/settings/pinned
curl -u ":[YOUR_PASSWORD]" http://localhost:9980/api/bus/settings/s3
curl -u ":[YOUR_PASSWORD]" http://localhost:9980/api/bus/settings/uploads
```
placeholder: Paste the output of the above commands here
validations:
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,15 @@ jobs:
autopilot
bus bus/client
worker worker/client
flags: |
-japecheck.types=false
test:
needs: analyze
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest , macos-latest, windows-latest ]
go-version: [ '1.22', '1.23' ]
os: [ubuntu-latest, macos-latest, windows-latest]
go-version: ["1.22", "1.23"]
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -47,7 +49,7 @@ jobs:
uses: mirromutth/[email protected]
with:
host port: 3800
mysql version: '8'
mysql version: "8"
mysql root password: test
- name: Test Stores
uses: n8maninger/action-golang-test@v1
Expand Down
67 changes: 2 additions & 65 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,6 @@ overview of all settings configurable through the CLI.
| `Log.Database.Level` | Logger level for database queries (info\|warn\|error). Defaults to 'warn' | `warn` | `--log.database.level` | `RENTERD_LOG_DATABASE_LEVEL`, `RENTERD_LOG_LEVEL` | `log.database.level` |
| `Log.Database.IgnoreRecordNotFoundError` | Enable ignoring 'not found' errors resulting from database queries. Defaults to 'true' | `true` | `--log.database.ignoreRecordNotFoundError` | `RENTERD_LOG_DATABASE_IGNORE_RECORD_NOT_FOUND_ERROR` | `log.database.ignoreRecordNotFoundError` |
| `Log.Database.SlowThreshold` | Threshold for slow queries in logger. Defaults to 100ms | `100ms` | `--log.database.slowThreshold` | `RENTERD_LOG_DATABASE_SLOW_THRESHOLD` | `log.database.slowThreshold` |
| `Log.Database.Level (DEPRECATED)` | Logger level | `warn` | `--db.logger.logLevel` | `RENTERD_DB_LOGGER_LOG_LEVEL` | `log.database.level` |
| `Log.Database.IgnoreRecordNotFoundError (DEPRECATED)` | Ignores 'not found' errors in logger | `true` | `--db.logger.ignoreNotFoundError`| `RENTERD_DB_LOGGER_IGNORE_NOT_FOUND_ERROR` | `log.ignoreRecordNotFoundError` |
| `Log.Database.SlowThreshold (DEPRECATED)` | Threshold for slow queries in logger | `100ms` | `--db.logger.slowThreshold` | `RENTERD_DB_LOGGER_SLOW_THRESHOLD` | `log.slowThreshold` |
| `Log.Path (DEPRECATED)` | Path to directory for logs | - | `--log-path` | `RENTERD_LOG_PATH` | `log.path` |
| `Database.MySQL.URI` | Database URI for the bus | - | `--db.uri` | `RENTERD_DB_URI` | `database.mysql.uri` |
| `Database.MySQL.User` | Database username for the bus | `renterd` | `--db.user` | `RENTERD_DB_USER` | `database.mysql.user` |
| `Database.MySQL.Password` | Database password for the bus | - | - | `RENTERD_DB_PASSWORD` | `database.mysql.password` |
Expand All @@ -70,7 +66,6 @@ overview of all settings configurable through the CLI.
| `Bus.GatewayAddr` | Address for Sia peer connections | `:9981` | `--bus.gatewayAddr` | `RENTERD_BUS_GATEWAY_ADDR` | `bus.gatewayAddr` |
| `Bus.RemoteAddr` | Remote address for the bus | - | - | `RENTERD_BUS_REMOTE_ADDR` | `bus.remoteAddr` |
| `Bus.RemotePassword` | Remote password for the bus | - | - | `RENTERD_BUS_API_PASSWORD` | `bus.remotePassword` |
| `Bus.PersistInterval` | Interval for persisting consensus updates | `1m` | `--bus.persistInterval` | - | `bus.persistInterval` |
| `Bus.UsedUTXOExpiry` | Expiry for used UTXOs in transactions | `24h` | `--bus.usedUTXOExpiry` | - | `bus.usedUtxoExpiry` |
| `Bus.SlabBufferCompletionThreshold` | Threshold for slab buffer upload | `4096` | `--bus.slabBufferCompletionThreshold` | `RENTERD_BUS_SLAB_BUFFER_COMPLETION_THRESHOLD` | `bus.slabBufferCompletionThreshold` |
| `Worker.AllowPrivateIPs` | Allows hosts with private IPs | - | `--worker.allowPrivateIPs` | - | `worker.allowPrivateIPs` |
Expand Down Expand Up @@ -102,7 +97,8 @@ overview of all settings configurable through the CLI.
| `S3.Enabled` | Enables/disables S3 API | `true` | `--s3.enabled` | `RENTERD_S3_ENABLED` | `s3.enabled` |
| `S3.HostBucketBases` | Enables bucket rewriting in the router for the provided bases | - | `--s3.hostBucketBases` | `RENTERD_S3_HOST_BUCKET_BASES` | `s3.hostBucketBases` |
| `S3.HostBucketEnabled` | Enables bucket rewriting in the router | - | `--s3.hostBucketEnabled` | `RENTERD_S3_HOST_BUCKET_ENABLED` | `s3.hostBucketEnabled` |
| `S3.KeypairsV4 (DEPRECATED)` | V4 keypairs for S3 | - | - | - | `s3.keypairsV4` |
| `Explorer.Disable` | Disables explorer service | `false` | `--explorer.disable` | `RENTERD_EXPLORER_DISABLE` | `explorer.disable` |
| `Explorer.URL` | URL of service to retrieve data about the Sia network | `https://api.siascan.com` | `--explorer.url` | `RENTERD_EXPLORER_URL` | `explorer.url` |

### Single-Node Setup

Expand Down Expand Up @@ -558,65 +554,6 @@ formed.
}
```

### Contract Set

The contract set settings on the bus allow specifying a default contract set.
This contract set will be returned by the `bus` through the upload parameters,
and decides what contracts data is upload or migrated to by default. This
setting does not have a default value, it can be updated using the settings API:

- `GET /api/bus/setting/contractset`
- `PUT /api/bus/setting/contractset`

```json
{
"default": "autopilot"
}
```

In most cases the default set should match the set from your autopilot
configuration in order for migrations to work properly. The contract set can be
overridden by passing it as a query string parameter to the worker's upload and
migrate endpoints.

- `PUT /api/worker/objects/foo?contractset=foo`

### Redundancy

The default redundancy on mainnet is 30-10, on testnet it is 6-2. The redundancy
can be updated using the settings API:

- `GET /api/bus/setting/redundancy`
- `PUT /api/bus/setting/redundancy`

The redundancy can also be passed through query string parameters on the upload
endpoint in the worker API:

- `PUT /api/worker/objects/foo?minshards=2&totalshards=5`

### Gouging

The default gouging settings are listed below. The gouging settings can be
updated using the settings API:

- `GET /api/bus/setting/gouging`
- `PUT /api/bus/setting/gouging`

```json
{
"hostBlockHeightLeeway": 6, // 6 blocks
"maxContractPrice": "15000000000000000000000000", // 15 SC per contract
"maxDownloadPrice": "3000000000000000000000000000", // 3000 SC per 1 TB
"maxRPCPrice": "1000000000000000000000", // 1mS per RPC
"maxStoragePrice": "631593542824", // 3000 SC per TB per month
"maxUploadPrice": "3000000000000000000000000000", // 3000 SC per 1 TB
"migrationSurchargeMultiplier": 10, // overpay up to 10x for sectors migrations on critical slabs
"minAccountExpiry": 86400000000000, // 1 day
"minMaxEphemeralAccountBalance": "1000000000000000000000000", // 1 SC
"minPriceTableValidity": 300000000000 // 5 minutes
}
```

### Blocklist

Unfortunately the Sia blockchain is subject to hosts that announced themselves
Expand Down
24 changes: 24 additions & 0 deletions alerts/prometheus.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package alerts

import "go.sia.tech/renterd/internal/prometheus"

// PrometheusMetric implements prometheus.Marshaller.
func (a Alert) PrometheusMetric() (metrics []prometheus.Metric) {
metrics = append(metrics, prometheus.Metric{
Name: "renterd_alert",
Labels: map[string]any{
"id": a.ID,
"severity": a.Severity.String(),
"message": a.Message,
"timestamp": a.Timestamp,
},
Value: 1,
})
return
}

// PrometheusMetric implements prometheus.Marshaller.
func (a AlertsResponse) PrometheusMetric() (metrics []prometheus.Metric) {
metrics = prometheus.Slice(a.Alerts).PrometheusMetric()
return
}
1 change: 1 addition & 0 deletions api/autopilot.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ type (
// AutopilotStateResponse is the response type for the /autopilot/state
// endpoint.
AutopilotStateResponse struct {
ID string `json:"id"`
Configured bool `json:"configured"`
Migrating bool `json:"migrating"`
MigratingLastStart TimeRFC3339 `json:"migratingLastStart"`
Expand Down
4 changes: 0 additions & 4 deletions api/bucket.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ import (
"errors"
)

const (
DefaultBucketName = "default"
)

var (
// ErrBucketExists is returned when trying to create a bucket that already
// exists.
Expand Down
11 changes: 11 additions & 0 deletions api/bus.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,12 @@ import (
)

var (
ErrInvalidOffset = errors.New("offset must be non-negative")
ErrInvalidLength = errors.New("length must be positive")
ErrInvalidLimit = errors.New("limit must be -1 or bigger")
ErrMarkerNotFound = errors.New("marker not found")
ErrMaxFundAmountExceeded = errors.New("renewal exceeds max fund amount")
ErrExplorerDisabled = errors.New("explorer is disabled")
)

type (
Expand Down Expand Up @@ -64,6 +68,13 @@ type (
StartTime TimeRFC3339 `json:"startTime"`
Network string `json:"network"`
BuildState
Explorer ExplorerState `json:"explorer"`
}

// ExplorerState contains static information about explorer data sources.
ExplorerState struct {
Enabled bool `json:"enabled"`
URL string `json:"url,omitempty"`
}

ContractSetUpdateRequest struct {
Expand Down
99 changes: 35 additions & 64 deletions api/contract.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,26 +50,32 @@ type (

// ContractMetadata contains all metadata for a contract.
ContractMetadata struct {
ID types.FileContractID `json:"id"`
HostIP string `json:"hostIP"`
HostKey types.PublicKey `json:"hostKey"`
SiamuxAddr string `json:"siamuxAddr"`

ProofHeight uint64 `json:"proofHeight"`
RevisionHeight uint64 `json:"revisionHeight"`
RevisionNumber uint64 `json:"revisionNumber"`
Size uint64 `json:"size"`
StartHeight uint64 `json:"startHeight"`
State string `json:"state"`
WindowStart uint64 `json:"windowStart"`
WindowEnd uint64 `json:"windowEnd"`

ContractPrice types.Currency `json:"contractPrice"`
RenewedFrom types.FileContractID `json:"renewedFrom"`
Spending ContractSpending `json:"spending"`
TotalCost types.Currency `json:"totalCost"`

ContractSets []string `json:"contractSets"`
ID types.FileContractID `json:"id"`
HostKey types.PublicKey `json:"hostKey"`

ProofHeight uint64 `json:"proofHeight"`
RenewedFrom types.FileContractID `json:"renewedFrom"`
RevisionHeight uint64 `json:"revisionHeight"`
RevisionNumber uint64 `json:"revisionNumber"`
Size uint64 `json:"size"`
StartHeight uint64 `json:"startHeight"`
State string `json:"state"`
WindowStart uint64 `json:"windowStart"`
WindowEnd uint64 `json:"windowEnd"`

// costs & spending
ContractPrice types.Currency `json:"contractPrice"`
InitialRenterFunds types.Currency `json:"initialRenterFunds"`
Spending ContractSpending `json:"spending"`

// following fields are decorated
HostIP string `json:"hostIP"`
ContractSets []string `json:"contractSets,omitempty"`
SiamuxAddr string `json:"siamuxAddr,omitempty"`

// following fields are only set on archived contracts
ArchivalReason string `json:"archivalReason,omitempty"`
RenewedTo types.FileContractID `json:"renewedTo,omitempty"`
}

// ContractPrunableData wraps a contract's size information with its id.
Expand All @@ -80,11 +86,10 @@ type (

// ContractSpending contains all spending details for a contract.
ContractSpending struct {
Uploads types.Currency `json:"uploads"`
Downloads types.Currency `json:"downloads"`
FundAccount types.Currency `json:"fundAccount"`
Deletions types.Currency `json:"deletions"`
FundAccount types.Currency `json:"fundAccount"`
SectorRoots types.Currency `json:"sectorRoots"`
Uploads types.Currency `json:"uploads"`
}

ContractSpendingRecord struct {
Expand All @@ -96,29 +101,6 @@ type (
MissedHostPayout types.Currency `json:"missedHostPayout"`
ValidRenterPayout types.Currency `json:"validRenterPayout"`
}

// An ArchivedContract contains all information about a contract with a host
// that has been moved to the archive either due to expiring or being renewed.
ArchivedContract struct {
ID types.FileContractID `json:"id"`
HostIP string `json:"hostIP"`
HostKey types.PublicKey `json:"hostKey"`
RenewedTo types.FileContractID `json:"renewedTo"`
Spending ContractSpending `json:"spending"`

ArchivalReason string `json:"archivalReason"`
ContractPrice types.Currency `json:"contractPrice"`
ProofHeight uint64 `json:"proofHeight"`
RenewedFrom types.FileContractID `json:"renewedFrom"`
RevisionHeight uint64 `json:"revisionHeight"`
RevisionNumber uint64 `json:"revisionNumber"`
Size uint64 `json:"size"`
StartHeight uint64 `json:"startHeight"`
State string `json:"state"`
TotalCost types.Currency `json:"totalCost"`
WindowStart uint64 `json:"windowStart"`
WindowEnd uint64 `json:"windowEnd"`
}
)

type (
Expand All @@ -137,11 +119,11 @@ type (

// ContractAddRequest is the request type for the /contract/:id endpoint.
ContractAddRequest struct {
Contract rhpv2.ContractRevision `json:"contract"`
ContractPrice types.Currency `json:"contractPrice"`
StartHeight uint64 `json:"startHeight"`
State string `json:"state,omitempty"`
TotalCost types.Currency `json:"totalCost"`
ContractPrice types.Currency `json:"contractPrice"`
InitialRenterFunds types.Currency `json:"initialRenterFunds"`
Revision rhpv2.ContractRevision `json:"revision"`
StartHeight uint64 `json:"startHeight"`
State string `json:"state,omitempty"`
}

// ContractFormRequest is the request type for the POST /contracts endpoint.
Expand Down Expand Up @@ -192,17 +174,6 @@ type (
RenterFunds types.Currency `json:"renterFunds"`
}

// ContractRenewedRequest is the request type for the /contract/:id/renewed
// endpoint.
ContractRenewedRequest struct {
Contract rhpv2.ContractRevision `json:"contract"`
ContractPrice types.Currency `json:"contractPrice"`
RenewedFrom types.FileContractID `json:"renewedFrom"`
StartHeight uint64 `json:"startHeight"`
State string `json:"state,omitempty"`
TotalCost types.Currency `json:"totalCost"`
}

// ContractRootsResponse is the response type for the /contract/:id/roots
// endpoint.
ContractRootsResponse struct {
Expand All @@ -223,18 +194,18 @@ type (

ContractsOpts struct {
ContractSet string `json:"contractset"`
FilterMode string `json:"filterMode"`
}
)

// Total returns the total cost of the contract spending.
func (x ContractSpending) Total() types.Currency {
return x.Uploads.Add(x.Downloads).Add(x.FundAccount).Add(x.Deletions).Add(x.SectorRoots)
return x.Uploads.Add(x.FundAccount).Add(x.Deletions).Add(x.SectorRoots)
}

// Add returns the sum of the current and given contract spending.
func (x ContractSpending) Add(y ContractSpending) (z ContractSpending) {
z.Uploads = x.Uploads.Add(y.Uploads)
z.Downloads = x.Downloads.Add(y.Downloads)
z.FundAccount = x.FundAccount.Add(y.FundAccount)
z.Deletions = x.Deletions.Add(y.Deletions)
z.SectorRoots = x.SectorRoots.Add(y.SectorRoots)
Expand Down
Loading
Loading