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

It has happened #1418

Draft
wants to merge 23 commits into
base: api-breakers
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
0120b79
e2e: make v2 hardfork height a build flag
ChrisSchinnerl Jul 31, 2024
6f05040
test.yml: run integration tests for post-hardfork height
ChrisSchinnerl Aug 6, 2024
eb9ed23
bus: add /wallet/send endpoint
ChrisSchinnerl Aug 6, 2024
719d930
bus: use redistribute v2
ChrisSchinnerl Aug 6, 2024
3530957
bus: pass req param on to FundTransaction
ChrisSchinnerl Aug 7, 2024
1c552cf
bus: use V2UnconfirmedParents
ChrisSchinnerl Aug 9, 2024
539da14
e2e: fix TestWalletSendUnconfirmed
ChrisSchinnerl Aug 12, 2024
e5251dd
Merge branch 'dev' into its-happening
ChrisSchinnerl Aug 12, 2024
3bd86c3
go.mod: update hostd dependency
ChrisSchinnerl Aug 12, 2024
f8480e4
Merge branch 'its-happening' of github.com:SiaFoundation/renterd into…
ChrisSchinnerl Aug 12, 2024
708c7c4
bus: broadcast block outline
ChrisSchinnerl Aug 12, 2024
e1d5d1e
Merge branch 'dev' into its-happening
ChrisSchinnerl Aug 12, 2024
553a69f
e2e: reduce feeReserve
ChrisSchinnerl Aug 12, 2024
a5298c6
go.mod: update hostd dep
ChrisSchinnerl Aug 14, 2024
cfcbd01
Merge branch 'dev' into its-happening
ChrisSchinnerl Aug 14, 2024
50f1d12
contractor: add todos
ChrisSchinnerl Aug 14, 2024
f7b7ba1
go.mod: update core, coreutils and hostd dependencies
ChrisSchinnerl Aug 15, 2024
60665eb
Merge branch 'dev' into its-happening
ChrisSchinnerl Aug 15, 2024
9e0f783
Merge branch 'dev' into its-happening
ChrisSchinnerl Aug 15, 2024
123561b
Merge branch 'dev' into its-happening
ChrisSchinnerl Aug 16, 2024
71dcdc2
Merge branch 'dev' into its-happening
ChrisSchinnerl Aug 20, 2024
114ed26
Merge branch 'dev' into its-happening
ChrisSchinnerl Aug 27, 2024
71492b5
Merge branch 'api-breakers' into its-happening
ChrisSchinnerl Sep 18, 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
17 changes: 17 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,20 @@ jobs:
args: "-failfast;-race;-timeout=60m"
- name: Build
run: go build -o bin/ ./cmd/renterd
- name: Test Integration V2
uses: n8maninger/action-golang-test@v1
with:
package: "./internal/test/e2e/..."
args: "-failfast;-race;-tags=testing,v2;-timeout=30m"
- name: Test Integration V2 - MySQL
if: matrix.os == 'ubuntu-latest'
uses: n8maninger/action-golang-test@v1
env:
RENTERD_DB_URI: 127.0.0.1:3800
RENTERD_DB_USER: root
RENTERD_DB_PASSWORD: test
with:
package: "./internal/test/e2e/..."
args: "-failfast;-race;-tags=testing,v2;-timeout=30m"
- name: Build
run: go build -o bin/ ./cmd/renterd
2 changes: 2 additions & 0 deletions autopilot/contractor/contractor.go
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,8 @@ func (c *Contractor) refreshFundingEstimate(cfg api.AutopilotConfig, contract ap
}

func (c *Contractor) shouldArchive(contract api.Contract, bh uint64) error {
// TODO: check if a v1 contract still exists beyond the v2 require height.
// If so we archive it since we can't renew it.
if bh > contract.EndHeight()-c.revisionSubmissionBuffer {
return errContractExpired
} else if contract.Revision != nil && contract.Revision.RevisionNumber == math.MaxUint64 {
Expand Down
2 changes: 2 additions & 0 deletions autopilot/contractor/hostfilter.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ func (u *unusableHostsBreakdown) keysAndValues() []interface{} {
// - refresh -> should be refreshed
// - renew -> should be renewed
func (c *Contractor) isUsableContract(cfg api.AutopilotConfig, s rhpv2.HostSettings, pt rhpv3.HostPriceTable, rs api.RedundancySettings, contract api.Contract, inSet bool, bh uint64, f *hostSet) (usable, refresh, renew bool, reasons []string) {
// TODO: check if a v1 contract has an end height beyond the v2 require
// height. If so we need to renew it.
usable = true
if bh > contract.EndHeight() {
reasons = append(reasons, errContractExpired.Error())
Expand Down
9 changes: 9 additions & 0 deletions internal/test/e2e/build_v1.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
//go:build !v2

package e2e

// configuration for pre-v2-hardfork tests
const (
HardforkV2AllowHeight = 10000
HardforkV2RequireHeight = 20000
)
9 changes: 9 additions & 0 deletions internal/test/e2e/build_v2.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
//go:build v2

package e2e

// configuration for post-v2-hardfork tests
const (
HardforkV2AllowHeight = 2
HardforkV2RequireHeight = 3
)
14 changes: 8 additions & 6 deletions internal/test/e2e/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -517,11 +517,13 @@ func newTestCluster(t *testing.T, opts testClusterOptions) *TestCluster {
}

if nHosts > 0 {
cluster.AddHostsBlocking(nHosts)
cluster.AddHosts(nHosts)
cluster.WaitForPeers()
cluster.WaitForContracts()
cluster.WaitForContractSet(test.ContractSet, nHosts)
cluster.WaitForAccounts()
if !opts.skipRunningAutopilot && !opts.skipSettingAutopilot {
cluster.WaitForContracts()
cluster.WaitForContractSet(test.ContractSet, nHosts)
cluster.WaitForAccounts()
}
}

// Ping the UI
Expand Down Expand Up @@ -1066,8 +1068,8 @@ func testNetwork() (*consensus.Network, types.Block) {
n.HardforkOak.Height = 1
n.HardforkASIC.Height = 1
n.HardforkFoundation.Height = 1
n.HardforkV2.AllowHeight = 1000
n.HardforkV2.RequireHeight = 1020
n.HardforkV2.AllowHeight = HardforkV2AllowHeight
n.HardforkV2.RequireHeight = HardforkV2RequireHeight

return n, genesis
}
Expand Down
Loading