Merge pull request from filecoin-project/fix/nv16-testing-bundles

[nv16] testing bundles with fake proofs
This commit is contained in:
vyzo 2022-04-27 18:25:26 +03:00 committed by GitHub
commit 0295d22742
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
17 changed files with 40 additions and 27 deletions

View File

@ -146,6 +146,10 @@ func init() {
addExample(map[string]api.MarketDeal{
"t026363": ExampleValue("init", reflect.TypeOf(api.MarketDeal{}), nil).(api.MarketDeal),
})
addExample(map[string]*api.MarketDeal{
"t026363": ExampleValue("init", reflect.TypeOf(&api.MarketDeal{}), nil).(*api.MarketDeal),
})
addExample(map[string]api.MarketBalance{
"t026363": ExampleValue("init", reflect.TypeOf(api.MarketBalance{}), nil).(api.MarketBalance),
})

View File

@ -1,2 +1,2 @@
actors7_release=""
actors8_release=5921189441f18b88
actors8_release=940d99d34ffe413b

View File

@ -25,7 +25,7 @@ fetch() {
fi
fi
for net in mainnet caterpillarnet butterflynet calibrationnet devnet testing; do
for net in mainnet caterpillarnet butterflynet calibrationnet devnet testing testing-fake-proofs; do
fetch_bundle $ver $rel $net
done
@ -67,7 +67,7 @@ touch_bundles() {
mkdir $ver
fi
for net in mainnet caterpillarnet butterflynet calibrationnet devnet testing; do
for net in mainnet caterpillarnet butterflynet calibrationnet devnet testing testing-fake-proofs; do
touch $ver/builtin-actors-$net.car
done
}

Binary file not shown.

Binary file not shown.

View File

@ -707,7 +707,7 @@ Response:
"VerifiedDeal": true,
"Client": "f01234",
"Provider": "f01234",
"Label": {},
"Label": "",
"StartEpoch": 10101,
"EndEpoch": 10101,
"StoragePricePerEpoch": "0",
@ -1300,7 +1300,7 @@ Response:
"VerifiedDeal": true,
"Client": "f01234",
"Provider": "f01234",
"Label": {},
"Label": "",
"StartEpoch": 10101,
"EndEpoch": 10101,
"StoragePricePerEpoch": "0",
@ -1335,7 +1335,7 @@ Response:
"VerifiedDeal": true,
"Client": "f01234",
"Provider": "f01234",
"Label": {},
"Label": "",
"StartEpoch": 10101,
"EndEpoch": 10101,
"StoragePricePerEpoch": "0",
@ -1456,7 +1456,7 @@ Response:
"VerifiedDeal": true,
"Client": "f01234",
"Provider": "f01234",
"Label": {},
"Label": "",
"StartEpoch": 10101,
"EndEpoch": 10101,
"StoragePricePerEpoch": "0",
@ -2711,7 +2711,7 @@ Inputs:
"VerifiedDeal": true,
"Client": "f01234",
"Provider": "f01234",
"Label": {},
"Label": "",
"StartEpoch": 10101,
"EndEpoch": 10101,
"StoragePricePerEpoch": "0",
@ -3079,7 +3079,7 @@ Response:
"VerifiedDeal": true,
"Client": "f01234",
"Provider": "f01234",
"Label": {},
"Label": "",
"StartEpoch": 10101,
"EndEpoch": 10101,
"StoragePricePerEpoch": "0",

View File

@ -5447,7 +5447,7 @@ Response:
"VerifiedDeal": true,
"Client": "f01234",
"Provider": "f01234",
"Label": {},
"Label": "",
"StartEpoch": 10101,
"EndEpoch": 10101,
"StoragePricePerEpoch": "0",
@ -5525,7 +5525,7 @@ Response:
"VerifiedDeal": true,
"Client": "f01234",
"Provider": "f01234",
"Label": {},
"Label": "",
"StartEpoch": 10101,
"EndEpoch": 10101,
"StoragePricePerEpoch": "0",

View File

@ -5863,7 +5863,7 @@ Response:
"VerifiedDeal": true,
"Client": "f01234",
"Provider": "f01234",
"Label": {},
"Label": "",
"StartEpoch": 10101,
"EndEpoch": 10101,
"StoragePricePerEpoch": "0",
@ -5941,7 +5941,7 @@ Response:
"VerifiedDeal": true,
"Client": "f01234",
"Provider": "f01234",
"Label": {},
"Label": "",
"StartEpoch": 10101,
"EndEpoch": 10101,
"StoragePricePerEpoch": "0",

View File

@ -32,7 +32,7 @@ func TestDealRetrieveByAnyCid(t *testing.T) {
ctx := context.Background()
oldDelay := policy.GetPreCommitChallengeDelay()
policy.SetPreCommitChallengeDelay(5)
policy.SetPreCommitChallengeDelay(10)
t.Cleanup(func() {
policy.SetPreCommitChallengeDelay(oldDelay)
})

View File

@ -40,7 +40,7 @@ func TestDealWithMarketAndMinerNode(t *testing.T) {
kit.QuietMiningLogs()
oldDelay := policy.GetPreCommitChallengeDelay()
policy.SetPreCommitChallengeDelay(5)
policy.SetPreCommitChallengeDelay(10)
t.Cleanup(func() {
policy.SetPreCommitChallengeDelay(oldDelay)
})
@ -92,7 +92,7 @@ func TestDealCyclesConcurrent(t *testing.T) {
}
oldDelay := policy.GetPreCommitChallengeDelay()
policy.SetPreCommitChallengeDelay(5)
policy.SetPreCommitChallengeDelay(10)
t.Cleanup(func() {
policy.SetPreCommitChallengeDelay(oldDelay)
})
@ -143,7 +143,7 @@ func TestSimultanenousTransferLimit(t *testing.T) {
kit.QuietMiningLogs()
oldDelay := policy.GetPreCommitChallengeDelay()
policy.SetPreCommitChallengeDelay(5)
policy.SetPreCommitChallengeDelay(10)
t.Cleanup(func() {
policy.SetPreCommitChallengeDelay(oldDelay)
})

View File

@ -26,7 +26,7 @@ func TestDealPadding(t *testing.T) {
var blockTime = 250 * time.Millisecond
startEpoch := abi.ChainEpoch(2 << 12)
policy.SetPreCommitChallengeDelay(2)
policy.SetPreCommitChallengeDelay(10)
client, miner, ens := kit.EnsembleMinimal(t, kit.ThroughRPC(), kit.WithAllSubsystems()) // no mock proofs.
ens.InterconnectAll().BeginMining(blockTime)

View File

@ -46,7 +46,7 @@ func TestDMLevelPartialRetrieval(t *testing.T) {
//stm: @CLIENT_RETRIEVAL_RETRIEVE_001, @CLIENT_RETRIEVAL_FIND_001
ctx := context.Background()
policy.SetPreCommitChallengeDelay(2)
policy.SetPreCommitChallengeDelay(10)
kit.QuietMiningLogs()
client, miner, ens := kit.EnsembleMinimal(t, kit.ThroughRPC(), kit.MockProofs())
dh := kit.NewDealHarness(t, client, miner, miner)

View File

@ -48,7 +48,7 @@ func TestPartialRetrieval(t *testing.T) {
//stm: @CLIENT_RETRIEVAL_RETRIEVE_001
ctx := context.Background()
policy.SetPreCommitChallengeDelay(2)
policy.SetPreCommitChallengeDelay(10)
kit.EnableLargeSectors(t)
kit.QuietMiningLogs()
client, miner, ens := kit.EnsembleMinimal(t, kit.ThroughRPC(), kit.MockProofs(), kit.SectorSize(512<<20))

View File

@ -36,7 +36,7 @@ func TestDealsRetryLackOfFunds(t *testing.T) {
//stm: @CLIENT_STORAGE_DEALS_LIST_IMPORTS_001
ctx := context.Background()
oldDelay := policy.GetPreCommitChallengeDelay()
policy.SetPreCommitChallengeDelay(5)
policy.SetPreCommitChallengeDelay(10)
t.Cleanup(func() {
policy.SetPreCommitChallengeDelay(oldDelay)
@ -120,7 +120,7 @@ func TestDealsRetryLackOfFunds_blockInPublishDeal(t *testing.T) {
//stm: @CLIENT_STORAGE_DEALS_LIST_IMPORTS_001
ctx := context.Background()
oldDelay := policy.GetPreCommitChallengeDelay()
policy.SetPreCommitChallengeDelay(5)
policy.SetPreCommitChallengeDelay(10)
t.Cleanup(func() {
policy.SetPreCommitChallengeDelay(oldDelay)
@ -201,7 +201,7 @@ func TestDealsRetryLackOfFunds_belowLimit(t *testing.T) {
//stm: @CLIENT_STORAGE_DEALS_LIST_IMPORTS_001
ctx := context.Background()
oldDelay := policy.GetPreCommitChallengeDelay()
policy.SetPreCommitChallengeDelay(5)
policy.SetPreCommitChallengeDelay(10)
t.Cleanup(func() {
policy.SetPreCommitChallengeDelay(oldDelay)

View File

@ -23,7 +23,7 @@ func TestDealsWithSealingAndRPC(t *testing.T) {
kit.QuietMiningLogs()
oldDelay := policy.GetPreCommitChallengeDelay()
policy.SetPreCommitChallengeDelay(5)
policy.SetPreCommitChallengeDelay(10)
t.Cleanup(func() {
policy.SetPreCommitChallengeDelay(oldDelay)
})

View File

@ -223,7 +223,7 @@ func TestWindowPostDispute(t *testing.T) {
// Now try to be evil again
err = submitBadProof(ctx, client, evilMiner.OwnerKey.Address, evilMinerAddr, di, evilSectorLoc.Deadline, evilSectorLoc.Partition)
require.Error(t, err)
require.Contains(t, err.Error(), "message execution failed: exit 16, reason: window post failed: invalid PoSt")
require.Equal(t, 16, err)
// It didn't work because we're recovering.
}
@ -327,7 +327,7 @@ waitForProof:
}
_, err := client.MpoolPushMessage(ctx, msg, nil)
require.Error(t, err)
require.Contains(t, err.Error(), "failed to dispute valid post (RetCode=16)")
require.Equal(t, err, 16)
}
}

View File

@ -53,8 +53,17 @@ func LoadBuiltinActorsTesting(lc fx.Lifecycle, mctx helpers.MetricsCtx, bs dtype
base = "."
}
var template string
if build.InsecurePoStValidation {
template = "%s/build/builtin-actors/v%d/builtin-actors-testing-fake-proofs.car"
} else {
template = "%s/build/builtin-actors/v%d/builtin-actors-testing.car"
}
for _, ver := range []actors.Version{actors.Version8} {
path := fmt.Sprintf("%s/build/builtin-actors/v%d/builtin-actors-testing.car", base, ver)
path := fmt.Sprintf(template, base, ver)
log.Infof("loading testing bundle: %s", path)
file, err := os.Open(path)
if err != nil {