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

[Merged by Bors] - Refactor NIPostBuilder and activation.Builder for multiple identities. #5484

Closed
wants to merge 32 commits into from
Closed
Show file tree
Hide file tree
Changes from 17 commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
141a254
Refactor NIPostBuilder and activation.Builder for multiple identities.
fasmat Jan 19, 2024
bc0831d
Use stop func instead of start boolean to check if smeshing
fasmat Jan 23, 2024
5099a38
Add more tests
fasmat Jan 24, 2024
42c3966
Remove shorten utility function
fasmat Jan 24, 2024
a69fb46
Remove comment
fasmat Jan 25, 2024
102bcfc
Cleanup tests
fasmat Jan 25, 2024
4b089ec
Allow tests with multiple identities
fasmat Jan 25, 2024
eb299b0
Add tests for multi-smesher setup
fasmat Jan 29, 2024
5057547
Simplify tests
fasmat Jan 29, 2024
8730af0
Add HappyPath test for multismesher
fasmat Jan 30, 2024
95c9430
Prevent possible race
fasmat Jan 30, 2024
fe4a371
Remove unneeded assertion
fasmat Jan 30, 2024
f107041
Cleanup
fasmat Jan 30, 2024
fc5f75c
Update API
fasmat Jan 31, 2024
20b9682
Update API reference
fasmat Jan 31, 2024
ef0e6fb
Return unimplemented on deprecated GRPC call
fasmat Feb 1, 2024
cf39e02
Update api dependency
fasmat Feb 1, 2024
1a6bbae
Review feedback
fasmat Feb 1, 2024
f5be09b
Merge remote-tracking branch 'origin/develop' into 5149-multi-smesher…
fasmat Feb 1, 2024
3357261
Review feedback
fasmat Feb 1, 2024
a8b5e80
Continue reset when one ID fails
fasmat Feb 1, 2024
7fe8fc7
Review feedback
fasmat Feb 1, 2024
e040fed
Merge remote-tracking branch 'origin/develop' into 5149-multi-smesher…
fasmat Feb 1, 2024
e49d52a
Merge remote-tracking branch 'origin/develop' into 5149-multi-smesher…
fasmat Feb 2, 2024
d0fa77c
Add e2e test
fasmat Feb 2, 2024
cff5466
Merge remote-tracking branch 'origin/develop' into 5149-multi-smesher…
fasmat Feb 2, 2024
138617d
Merge remote-tracking branch 'origin/develop' into 5149-multi-smesher…
fasmat Feb 2, 2024
23cdcb5
Add e2e test for atxbuilder
fasmat Feb 2, 2024
5bdbc80
Merge remote-tracking branch 'origin/develop' into 5149-multi-smesher…
fasmat Feb 2, 2024
e06ab21
Fix issues after merge
fasmat Feb 2, 2024
8dfbcb3
Cleanup and test fixes
fasmat Feb 2, 2024
512cd65
Fix races
fasmat Feb 2, 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
177 changes: 104 additions & 73 deletions activation/activation.go

Large diffs are not rendered by default.

483 changes: 483 additions & 0 deletions activation/activation_multi_test.go

Large diffs are not rendered by default.

611 changes: 329 additions & 282 deletions activation/activation_test.go

Large diffs are not rendered by default.

9 changes: 3 additions & 6 deletions activation/e2e/nipost_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,6 @@ func TestNIPostBuilderWithClients(t *testing.T) {
svc,
[]types.PoetServer{{Address: poetProver.RestURL().String()}},
logger.Named("nipostBuilder"),
sig,
poetCfg,
mclock,
)
Expand All @@ -194,7 +193,7 @@ func TestNIPostBuilderWithClients(t *testing.T) {
challenge := types.NIPostChallenge{
PublishEpoch: postGenesisEpoch + 2,
}
nipost, err := nb.BuildNIPost(context.Background(), &challenge)
nipost, err := nb.BuildNIPost(context.Background(), sig, &challenge)
require.NoError(t, err)

v := activation.NewValidator(poetDb, cfg, opts.Scrypt, verifier)
Expand Down Expand Up @@ -238,7 +237,6 @@ func TestNIPostBuilder_Close(t *testing.T) {
svc,
[]types.PoetServer{{Address: poetProver.RestURL().String()}},
logger.Named("nipostBuilder"),
sig,
activation.PoetConfig{},
mclock,
)
Expand All @@ -249,7 +247,7 @@ func TestNIPostBuilder_Close(t *testing.T) {
}
ctx, cancel := context.WithCancel(context.Background())
cancel()
nipost, err := nb.BuildNIPost(ctx, &challenge)
nipost, err := nb.BuildNIPost(ctx, sig, &challenge)
require.ErrorIs(t, err, context.Canceled)
require.Nil(t, nipost)
}
Expand Down Expand Up @@ -314,7 +312,6 @@ func TestNewNIPostBuilderNotInitialized(t *testing.T) {
svc,
[]types.PoetServer{{Address: poetProver.RestURL().String()}},
logger.Named("nipostBuilder"),
sig,
poetCfg,
mclock,
)
Expand All @@ -334,7 +331,7 @@ func TestNewNIPostBuilderNotInitialized(t *testing.T) {
challenge := types.NIPostChallenge{
PublishEpoch: postGenesisEpoch + 2,
}
nipost, err := nb.BuildNIPost(context.Background(), &challenge)
nipost, err := nb.BuildNIPost(context.Background(), sig, &challenge)
require.NoError(t, err)
require.NotNil(t, nipost)

Expand Down
3 changes: 1 addition & 2 deletions activation/e2e/validation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,12 @@ func TestValidator_Validate(t *testing.T) {
svc,
[]types.PoetServer{{Address: poetProver.RestURL().String()}},
logger.Named("nipostBuilder"),
sig,
poetCfg,
mclock,
)
require.NoError(t, err)

nipost, err := nb.BuildNIPost(context.Background(), &challenge)
nipost, err := nb.BuildNIPost(context.Background(), sig, &challenge)
require.NoError(t, err)

v := activation.NewValidator(poetDb, cfg, opts.Scrypt, verifier)
Expand Down
Loading
Loading