chore: sync upstream SiaFoundation/indexd - #18
Conversation
chore: prepare release 0.3.2
Bumps the dependencies group with 2 updates: [go.sia.tech/core](https://github.com/SiaFoundation/core) and [go.sia.tech/coreutils](https://github.com/SiaFoundation/coreutils). Updates `go.sia.tech/core` from 0.21.4 to 0.21.5 - [Release notes](https://github.com/SiaFoundation/core/releases) - [Changelog](https://github.com/SiaFoundation/core/blob/master/CHANGELOG.md) - [Commits](SiaFoundation/core@v0.21.4...v0.21.5) Updates `go.sia.tech/coreutils` from 0.23.3 to 0.23.4 - [Release notes](https://github.com/SiaFoundation/coreutils/releases) - [Changelog](https://github.com/SiaFoundation/coreutils/blob/master/CHANGELOG.md) - [Commits](SiaFoundation/coreutils@v0.23.3...v0.23.4) --- updated-dependencies: - dependency-name: go.sia.tech/core dependency-version: 0.21.5 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: dependencies - dependency-name: go.sia.tech/coreutils dependency-version: 0.23.4 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: dependencies ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps the dependencies group with 2 updates: [go.sia.tech/core](https://github.com/SiaFoundation/core) and [go.sia.tech/coreutils](https://github.com/SiaFoundation/coreutils). Updates `go.sia.tech/core` from 0.21.5 to 0.21.6 - [Release notes](https://github.com/SiaFoundation/core/releases) - [Changelog](https://github.com/SiaFoundation/core/blob/master/CHANGELOG.md) - [Commits](SiaFoundation/core@v0.21.5...v0.21.6) Updates `go.sia.tech/coreutils` from 0.23.4 to 0.23.5 - [Release notes](https://github.com/SiaFoundation/coreutils/releases) - [Changelog](https://github.com/SiaFoundation/coreutils/blob/master/CHANGELOG.md) - [Commits](SiaFoundation/coreutils@v0.23.4...v0.23.5) --- updated-dependencies: - dependency-name: go.sia.tech/core dependency-version: 0.21.6 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: dependencies - dependency-name: go.sia.tech/coreutils dependency-version: 0.23.5 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: dependencies ... Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Update default slab prune cutoff to 72 hours instead of 1 hour
…e-settings-validation
…on/indexd into pj/cache-settings-validation
Skip redundant settings validation
# Conflicts: # .github/workflows/benchmark.yml # api/admin/admin_test.go # persist/postgres/migrations.go
Code Review Could Not Complete
|
| Options | Enabled |
|---|---|
| Bug | ✅ |
| Performance | ✅ |
| Security | ✅ |
| Business Logic | ✅ |
| }); err != nil { | ||
| t.Fatal(err) | ||
| } | ||
| connectKey, err := manager.AddAppConnectKey(t.Context(), accounts.AppConnectKeyRequest{Key: "connect-key", Quota: testutils.TestQuotaName}) |
There was a problem hiding this comment.
The hard-coded string literal "connect-key" in accounts/manager_test.go and accounts/connect.go:289-289 contains the secret keyword "key" and violates Rule [1], which bans hard-coded secrets unless sourced from an environment variable or secure keystore. Move the value into an environment variable such as os.Getenv("TEST_CONNECT_KEY") or a secure test fixture, and reference that variable here.
Kody rule violation: Ban hard-coded secrets in Go source
Prompt for LLM
File accounts/manager_test.go:
Line 221:
The hard-coded string literal "connect-key" in accounts/manager_test.go and accounts/connect.go:289-289 contains the secret keyword "key" and violates Rule [1], which bans hard-coded secrets unless sourced from an environment variable or secure keystore. Move the value into an environment variable such as os.Getenv("TEST_CONNECT_KEY") or a secure test fixture, and reference that variable here.
Talk to Kody by mentioning @kody
Was this suggestion helpful? React with 👍 or 👎 to help Kody learn from this interaction.
chore: sync upstream SiaFoundation/indexd
This PR synchronizes the latest upstream changes from
SiaFoundation/indexd(through thev0.4.1release). Functionally it introduces new application‑auth, remote‑migration, and slab‑management capabilities, plus several host/client reliability fixes.New features
Pre-authorized app connect keys
preauthorized_keysdatabase table and manager methods.GET/POST /apps/preauthorized/keys,GET/DELETE /apps/preauthorized/keys/:publicKey.preAuthorizedKey+ signature proof.Remote migration worker
indexd remotesubcommand runs a migration-only node that helps a primaryindexdmigrate unhealthy slabs.slabs.migrations: falseand expose work throughPOST /migrations/batch.POST /migrations/results.remoteconfig section (address,password) and adocker-compose.remote.ymlexample.Slab versioning
versionfield toSlab,SlabSlice,PinnedSlab, andSlabPinParams.> 0, preserving IDs for legacy version 0 slabs.Lifecycle and API improvements
Object deletion cleans up unreferenced slabs
DefaultSlabPruneCutoff).Unpinning a referenced slab returns
409 ConflictDELETE /slabs/:slabidnow fails withErrSlabInUse/409 Conflictwhile one of the account’s objects still references the slab.Concurrency hardening
PinObjectnow lock slabs/sectors in consistent digest/root order to prevent races and double-accounting.Host/client fixes
Bounded host connect timeout
Host price tip-height check
AppendSectorsnow checks the host’s claimed tip height against the local tip height; if it drifts beyond tolerance the client refreshes host settings.Settings cache hit skips redundant verification
ed25519verification on the hot path.Host failure-rate decay
Corrupt sectors treated as lost
proto.ErrSectorCorruptis now recognized as a lost/corrupt sector during integrity checks and shard recovery.Auto-unblock usable hosts
Metrics and statistics
ContractsStatsnow includelockedAllowanceandremainingAllowance.HostStatsinclude per-hostlockedAllowanceandremainingAllowance, and active contract size is computed from non-renewed active contracts only.indexd_connect_keys_active,indexd_connect_keys_active_quota,indexd_contracts_locked_allowance,indexd_contracts_remaining_allowance,indexd_host_locked_allowance,indexd_host_remaining_allowance) are added/updated.Documentation and schema
CHANGELOG.mdupdated with thev0.4.1andv0.4.0release notes.README.mddocuments the remote migration node configuration.admin.yml,app.yml,components.yml) updated with pre-authorized keys, migration endpoints, and slab versioning.