Ejemplo n.º 1
0
        public async Task TestValidators80DutiesForEpochZeroHaveExactlyOneProposerPerSlot()
        {
            // Arrange
            IServiceCollection testServiceCollection = TestSystem.BuildTestServiceCollection(useStore: true);

            testServiceCollection.AddSingleton <IHostEnvironment>(Substitute.For <IHostEnvironment>());
            testServiceCollection.AddSingleton <IEth1DataProvider>(Substitute.For <IEth1DataProvider>());
            testServiceCollection.AddSingleton <IOperationPool>(Substitute.For <IOperationPool>());
            ServiceProvider testServiceProvider = testServiceCollection.BuildServiceProvider();
            BeaconState     state      = TestState.PrepareTestState(testServiceProvider);
            ForkChoice      forkChoice = testServiceProvider.GetService <ForkChoice>();

            // Get genesis store initialise MemoryStoreProvider with the state
            _ = forkChoice.GetGenesisStore(state);

            TimeParameters timeParameters     = testServiceProvider.GetService <IOptions <TimeParameters> >().Value;
            int            numberOfValidators = state.Validators.Count;

            Console.WriteLine("Number of validators: {0}", numberOfValidators);
            BlsPublicKey[] publicKeys  = TestKeys.PublicKeys(timeParameters).ToArray();
            byte[][]       privateKeys = TestKeys.PrivateKeys(timeParameters).ToArray();
            for (int index = 0; index < numberOfValidators; index++)
            {
                Console.WriteLine("[{0}] priv:{1} pub:{2}", index, "0x" + BitConverter.ToString(privateKeys[index]).Replace("-", ""), publicKeys[index]);
            }

            // Act
            Epoch targetEpoch = new Epoch(0);
            IEnumerable <BlsPublicKey> validatorPublicKeys = publicKeys.Take(numberOfValidators);
            IBeaconNodeApi             beaconNode          = testServiceProvider.GetService <IBeaconNodeApi>();

            beaconNode.ShouldBeOfType(typeof(BeaconNodeFacade));

            int validatorDutyIndex = 0;
            List <ValidatorDuty> validatorDuties = new List <ValidatorDuty>();

            await foreach (ValidatorDuty validatorDuty in beaconNode.ValidatorDutiesAsync(validatorPublicKeys, targetEpoch, CancellationToken.None))
            {
                validatorDuties.Add(validatorDuty);
                Console.WriteLine("Index [{0}], Epoch {1}, Validator {2}, : attestation slot {3}, shard {4}, proposal slot {5}",
                                  validatorDutyIndex, targetEpoch, validatorDuty.ValidatorPublicKey, validatorDuty.AttestationSlot,
                                  (ulong)validatorDuty.AttestationShard, validatorDuty.BlockProposalSlot);
                validatorDutyIndex++;
            }

            // Assert
            Dictionary <Slot, IGrouping <Slot, ValidatorDuty> > groupsByProposalSlot = validatorDuties
                                                                                       .GroupBy(x => x.BlockProposalSlot)
                                                                                       .ToDictionary(x => x.Key, x => x);

            groupsByProposalSlot[new Slot(0)].Count().ShouldBe(1);
            groupsByProposalSlot[new Slot(1)].Count().ShouldBe(1);
            groupsByProposalSlot[new Slot(2)].Count().ShouldBe(1);
            groupsByProposalSlot[new Slot(3)].Count().ShouldBe(1);
            groupsByProposalSlot[new Slot(4)].Count().ShouldBe(1);
            groupsByProposalSlot[new Slot(5)].Count().ShouldBe(1);
            //groupsByProposalSlot[new Slot(6)].Count().ShouldBe(1);
            groupsByProposalSlot[new Slot(7)].Count().ShouldBe(1);
            //groupsByProposalSlot[Slot.None].Count().ShouldBe(numberOfValidators - 7);
        }
Ejemplo n.º 2
0
        public async Task QuickStart64DutiesForEpochZeroHaveExactlyOneProposerPerSlot()
        {
            // Arrange
            int numberOfValidators = 64;
            int genesisTime        = 1578009600;
            IServiceCollection testServiceCollection = TestSystem.BuildTestServiceCollection(useStore: true);
            IConfigurationRoot configuration         = new ConfigurationBuilder()
                                                       .AddInMemoryCollection(new Dictionary <string, string>
            {
                ["QuickStart:ValidatorCount"] = $"{numberOfValidators}",
                ["QuickStart:GenesisTime"]    = $"{genesisTime}"
            })
                                                       .Build();

            testServiceCollection.AddBeaconNodeQuickStart(configuration);
            testServiceCollection.AddSingleton <IHostEnvironment>(Substitute.For <IHostEnvironment>());
            ServiceProvider testServiceProvider = testServiceCollection.BuildServiceProvider();

            INodeStart quickStart = testServiceProvider.GetService <INodeStart>();
            await quickStart.InitializeNodeAsync();

            IStoreProvider storeProvider = testServiceProvider.GetService <IStoreProvider>();

            storeProvider.TryGetStore(out IStore? store).ShouldBeTrue();
            BeaconState state = await store !.GetBlockStateAsync(store !.FinalizedCheckpoint.Root);

            // Act
            Epoch targetEpoch = new Epoch(0);
            IEnumerable <BlsPublicKey> validatorPublicKeys = state !.Validators.Select(x => x.PublicKey);
            IBeaconNodeApi             beaconNode          = testServiceProvider.GetService <IBeaconNodeApi>();

            beaconNode.ShouldBeOfType(typeof(BeaconNodeFacade));

            int validatorDutyIndex = 0;
            List <ValidatorDuty> validatorDuties = new List <ValidatorDuty>();

            await foreach (ValidatorDuty validatorDuty in beaconNode.ValidatorDutiesAsync(validatorPublicKeys, targetEpoch, CancellationToken.None))
            {
                validatorDuties.Add(validatorDuty);
                Console.WriteLine("Index [{0}], Epoch {1}, Validator {2}, : attestation slot {3}, shard {4}, proposal slot {5}",
                                  validatorDutyIndex, targetEpoch, validatorDuty.ValidatorPublicKey, validatorDuty.AttestationSlot,
                                  (ulong)validatorDuty.AttestationShard, validatorDuty.BlockProposalSlot);
                validatorDutyIndex++;
            }

            // Assert
            Dictionary <Slot, IGrouping <Slot, ValidatorDuty> > groupsByProposalSlot = validatorDuties
                                                                                       .GroupBy(x => x.BlockProposalSlot)
                                                                                       .ToDictionary(x => x.Key, x => x);

            groupsByProposalSlot[new Slot(0)].Count().ShouldBe(1);
            groupsByProposalSlot[new Slot(1)].Count().ShouldBe(1);
            groupsByProposalSlot[new Slot(2)].Count().ShouldBe(1);
            groupsByProposalSlot[new Slot(3)].Count().ShouldBe(1);
            groupsByProposalSlot[new Slot(4)].Count().ShouldBe(1);
            groupsByProposalSlot[new Slot(5)].Count().ShouldBe(1);
            groupsByProposalSlot[new Slot(6)].Count().ShouldBe(1);
            //groupsByProposalSlot[new Slot(7)].Count().ShouldBe(1);
            //groupsByProposalSlot[Slot.None].Count().ShouldBe(numberOfValidators - 8);
        }
Ejemplo n.º 3
0
        public async Task ShouldReturnDefaultForkVersion()
        {
            // Arrange
            IServiceCollection testServiceCollection = TestSystem.BuildTestServiceCollection(useStore: true);

            testServiceCollection.AddSingleton <IHostEnvironment>(Substitute.For <IHostEnvironment>());
            testServiceCollection.AddSingleton <IEth1DataProvider>(Substitute.For <IEth1DataProvider>());
            testServiceCollection.AddSingleton <IOperationPool>(Substitute.For <IOperationPool>());
            ServiceProvider testServiceProvider = testServiceCollection.BuildServiceProvider();
            BeaconState     state      = TestState.PrepareTestState(testServiceProvider);
            ForkChoice      forkChoice = testServiceProvider.GetService <ForkChoice>();

            // Get genesis store initialise MemoryStoreProvider with the state
            _ = forkChoice.GetGenesisStore(state);

            // Act
            IBeaconNodeApi beaconNode = testServiceProvider.GetService <IBeaconNodeApi>();

            beaconNode.ShouldBeOfType(typeof(BeaconNodeFacade));

            Core2.Containers.Fork fork = await beaconNode.GetNodeForkAsync(CancellationToken.None);

            // Assert
            fork.Epoch.ShouldBe(Epoch.Zero);
            fork.CurrentVersion.ShouldBe(new ForkVersion());
            fork.PreviousVersion.ShouldBe(new ForkVersion());
        }
Ejemplo n.º 4
0
        public async Task NodeVersionInitialFailTryAgain()
        {
            // Arrange
            IServiceCollection testServiceCollection = TestSystem.BuildTestServiceCollection();

            IBeaconNodeOApiClient beaconNodeOApiClient1 = Substitute.For <IBeaconNodeOApiClient>();

            beaconNodeOApiClient1.VersionAsync(Arg.Any <CancellationToken>()).Throws(new HttpRequestException("TESTEXCEPTION"));
            IBeaconNodeOApiClient beaconNodeOApiClient2 = Substitute.For <IBeaconNodeOApiClient>();

            beaconNodeOApiClient2.VersionAsync(Arg.Any <CancellationToken>()).Returns("TESTVERSION");
            IBeaconNodeOApiClientFactory beaconNodeOApiClientFactory = Substitute.For <IBeaconNodeOApiClientFactory>();

            beaconNodeOApiClientFactory.CreateClient(Arg.Any <string>()).Returns(beaconNodeOApiClient1, beaconNodeOApiClient2);
            testServiceCollection.AddSingleton <IBeaconNodeOApiClientFactory>(beaconNodeOApiClientFactory);

            ServiceProvider testServiceProvider = testServiceCollection.BuildServiceProvider();

            // Act
            IBeaconNodeApi beaconNodeProxy = testServiceProvider.GetService <IBeaconNodeApi>();

            beaconNodeProxy.ShouldBeOfType(typeof(BeaconNodeProxy));
            string version1 = await beaconNodeProxy.GetNodeVersionAsync(CancellationToken.None);

            // Assert
            version1.ShouldBe("TESTVERSION");
            beaconNodeOApiClientFactory.CreateClient(Arg.Any <string>()).Received(2);
        }
Ejemplo n.º 5
0
        public async Task NodeVersionTwiceShouldUseSameClient()
        {
            // Arrange
            IServiceCollection testServiceCollection = TestSystem.BuildTestServiceCollection();

            IBeaconNodeOApiClient beaconNodeOApiClient = Substitute.For <IBeaconNodeOApiClient>();

            beaconNodeOApiClient.VersionAsync(Arg.Any <CancellationToken>()).Returns("TESTVERSION");
            IBeaconNodeOApiClientFactory beaconNodeOApiClientFactory = Substitute.For <IBeaconNodeOApiClientFactory>();

            beaconNodeOApiClientFactory.CreateClient(Arg.Any <string>()).Returns(beaconNodeOApiClient);
            testServiceCollection.AddSingleton <IBeaconNodeOApiClientFactory>(beaconNodeOApiClientFactory);

            ServiceProvider testServiceProvider = testServiceCollection.BuildServiceProvider();

            // Act
            IBeaconNodeApi beaconNodeProxy = testServiceProvider.GetService <IBeaconNodeApi>();

            beaconNodeProxy.ShouldBeOfType(typeof(BeaconNodeProxy));
            string version1 = await beaconNodeProxy.GetNodeVersionAsync(CancellationToken.None);

            string version2 = await beaconNodeProxy.GetNodeVersionAsync(CancellationToken.None);

            // Assert
            version1.ShouldBe("TESTVERSION");
            version2.ShouldBe("TESTVERSION");
            beaconNodeOApiClientFactory.CreateClient(Arg.Any <string>()).Received(1);
        }
Ejemplo n.º 6
0
        public async Task TestValidators80DutiesForEpochOneHaveExactlyOneProposerPerSlot()
        {
            // Arrange
            IServiceCollection testServiceCollection = TestSystem.BuildTestServiceCollection(useStore: true);

            testServiceCollection.AddSingleton <IHostEnvironment>(Substitute.For <IHostEnvironment>());
            testServiceCollection.AddSingleton <IEth1DataProvider>(Substitute.For <IEth1DataProvider>());
            testServiceCollection.AddSingleton <IOperationPool>(Substitute.For <IOperationPool>());
            ServiceProvider testServiceProvider = testServiceCollection.BuildServiceProvider();
            BeaconState     state      = TestState.PrepareTestState(testServiceProvider);
            ForkChoice      forkChoice = testServiceProvider.GetService <ForkChoice>();

            // Get genesis store initialise MemoryStoreProvider with the state
            _ = forkChoice.GetGenesisStore(state);

            TimeParameters timeParameters     = testServiceProvider.GetService <IOptions <TimeParameters> >().Value;
            int            numberOfValidators = state.Validators.Count;

            Console.WriteLine("Number of validators: {0}", numberOfValidators);
            BlsPublicKey[] publicKeys = TestKeys.PublicKeys(timeParameters).ToArray();

            // Act
            Epoch          targetEpoch         = new Epoch(1);
            var            validatorPublicKeys = publicKeys.Take(numberOfValidators);
            IBeaconNodeApi beaconNode          = testServiceProvider.GetService <IBeaconNodeApi>();

            beaconNode.ShouldBeOfType(typeof(BeaconNodeFacade));
            var validatorDuties = await beaconNode.ValidatorDutiesAsync(validatorPublicKeys, targetEpoch);

            for (var index = 0; index < validatorDuties.Count; index++)
            {
                ValidatorDuty validatorDuty = validatorDuties[index];
                Console.WriteLine("Index [{0}], Epoch {1}, Validator {2}, : attestation slot {3}, shard {4}, proposal slot {5}",
                                  index, targetEpoch, validatorDuty.ValidatorPublicKey, validatorDuty.AttestationSlot,
                                  (ulong)validatorDuty.AttestationShard, validatorDuty.BlockProposalSlot);
            }

            // Assert
            Dictionary <Slot, IGrouping <Slot, ValidatorDuty> > groupsByProposalSlot = validatorDuties
                                                                                       .GroupBy(x => x.BlockProposalSlot)
                                                                                       .ToDictionary(x => x.Key, x => x);

            groupsByProposalSlot[new Slot(8)].Count().ShouldBe(1);
            groupsByProposalSlot[new Slot(9)].Count().ShouldBe(1);
            groupsByProposalSlot[new Slot(10)].Count().ShouldBe(1);
            groupsByProposalSlot[new Slot(11)].Count().ShouldBe(1);
            //groupsByProposalSlot[new Slot(12)].Count().ShouldBe(1);
            groupsByProposalSlot[new Slot(13)].Count().ShouldBe(1);
            groupsByProposalSlot[new Slot(14)].Count().ShouldBe(1);
            groupsByProposalSlot[new Slot(15)].Count().ShouldBe(1);
            //groupsByProposalSlot[Slot.None].Count().ShouldBe(numberOfValidators - 8);
        }
        public async Task ShouldGetStatusWhenSyncComplete()
        {
            // Arrange
            Slot            starting           = Slot.One;
            Slot            current            = new Slot(11);
            Slot            highest            = new Slot(11);
            INetworkPeering mockNetworkPeering = Substitute.For <INetworkPeering>();

            mockNetworkPeering.HighestPeerSlot.Returns(highest);
            mockNetworkPeering.SyncStartingSlot.Returns(starting);
            IStore            mockStore   = Substitute.For <IStore>();
            Root              root        = new Root(Enumerable.Repeat((byte)0x12, 32).ToArray());
            Checkpoint        checkpoint  = new Checkpoint(Epoch.Zero, root);
            SignedBeaconBlock signedBlock =
                new SignedBeaconBlock(new BeaconBlock(current, Root.Zero, Root.Zero, BeaconBlockBody.Zero),
                                      BlsSignature.Zero);
            BeaconState state = TestState.Create(slot: current, finalizedCheckpoint: checkpoint);

            mockStore.GetHeadAsync().Returns(root);
            mockStore.GetSignedBlockAsync(root).Returns(signedBlock);
            mockStore.GetBlockStateAsync(root).Returns(state);
            mockStore.IsInitialized.Returns(true);
            mockStore.JustifiedCheckpoint.Returns(checkpoint);

            IServiceCollection testServiceCollection = TestSystem.BuildTestServiceCollection(useStore: true);

            testServiceCollection.AddSingleton(mockNetworkPeering);
            testServiceCollection.AddSingleton(mockStore);
            testServiceCollection.AddSingleton <IHostEnvironment>(Substitute.For <IHostEnvironment>());
            testServiceCollection.AddSingleton <IEth1DataProvider>(Substitute.For <IEth1DataProvider>());
            testServiceCollection.AddSingleton <IOperationPool>(Substitute.For <IOperationPool>());
            ServiceProvider testServiceProvider = testServiceCollection.BuildServiceProvider();

            // Act
            IBeaconNodeApi beaconNode = testServiceProvider.GetService <IBeaconNodeApi>();

            beaconNode.ShouldBeOfType(typeof(BeaconNodeFacade));

            ApiResponse <Syncing> syncingResponse = await beaconNode.GetSyncingAsync(CancellationToken.None);

            Syncing syncing = syncingResponse.Content;

            // Assert
            syncing.IsSyncing.ShouldBeFalse();
            syncing.SyncStatus !.StartingSlot.ShouldBe(Slot.One);
            syncing.SyncStatus.CurrentSlot.ShouldBe(new Slot(11));
            syncing.SyncStatus.HighestSlot.ShouldBe(new Slot(11));
        }
Ejemplo n.º 8
0
        public async Task NodeVersionInitialFailAfterSuccessTryAgain()
        {
            // Arrange
            IServiceCollection testServiceCollection = TestSystem.BuildTestServiceCollection();

            IBeaconNodeOApiClient beaconNodeOApiClient1 = Substitute.For <IBeaconNodeOApiClient>();

            beaconNodeOApiClient1.VersionAsync(Arg.Any <CancellationToken>()).Returns(
                callInfo => "TESTVERSION1",
                callInfo => throw new HttpRequestException("TESTEXCEPTION")
                );
            beaconNodeOApiClient1.BaseUrl.Returns("CLIENT1");
            IBeaconNodeOApiClient beaconNodeOApiClient2 = Substitute.For <IBeaconNodeOApiClient>();

            beaconNodeOApiClient2.VersionAsync(Arg.Any <CancellationToken>()).Returns("TESTVERSION2");
            IBeaconNodeOApiClientFactory beaconNodeOApiClientFactory = Substitute.For <IBeaconNodeOApiClientFactory>();

            beaconNodeOApiClientFactory.CreateClient(Arg.Any <string>()).Returns(beaconNodeOApiClient1, beaconNodeOApiClient2);
            testServiceCollection.AddSingleton <IBeaconNodeOApiClientFactory>(beaconNodeOApiClientFactory);

            ServiceProvider testServiceProvider = testServiceCollection.BuildServiceProvider();

            // Act
            IBeaconNodeApi beaconNodeProxy = testServiceProvider.GetService <IBeaconNodeApi>();

            beaconNodeProxy.ShouldBeOfType(typeof(BeaconNodeProxy));
            string version1 = await beaconNodeProxy.GetNodeVersionAsync(CancellationToken.None);

            string version2 = await beaconNodeProxy.GetNodeVersionAsync(CancellationToken.None);

            // Assert
            version1.ShouldBe("TESTVERSION1");
            version2.ShouldBe("TESTVERSION2");
            beaconNodeOApiClientFactory.CreateClient(Arg.Any <string>()).Received(2);

            List <ICall> client1Received = beaconNodeOApiClient1.ReceivedCalls().ToList();

            client1Received.Count(x => x.GetMethodInfo().Name == nameof(beaconNodeOApiClient1.VersionAsync)).ShouldBe(2);

            List <ICall> client2Received = beaconNodeOApiClient2.ReceivedCalls().ToList();

            client2Received.Count(x => x.GetMethodInfo().Name == nameof(beaconNodeOApiClient1.VersionAsync)).ShouldBe(1);
        }
Ejemplo n.º 9
0
        public async Task BasicGensisTime()
        {
            // Arrange
            IServiceCollection testServiceCollection = TestSystem.BuildTestServiceCollection();

            IBeaconNodeOApiClient beaconNodeOApiClient = Substitute.For <IBeaconNodeOApiClient>();

            beaconNodeOApiClient.TimeAsync(Arg.Any <CancellationToken>()).Returns(1_578_009_600uL);
            IBeaconNodeOApiClientFactory beaconNodeOApiClientFactory = Substitute.For <IBeaconNodeOApiClientFactory>();

            beaconNodeOApiClientFactory.CreateClient(Arg.Any <string>()).Returns(beaconNodeOApiClient);
            testServiceCollection.AddSingleton <IBeaconNodeOApiClientFactory>(beaconNodeOApiClientFactory);

            ServiceProvider testServiceProvider = testServiceCollection.BuildServiceProvider();

            // Act
            IBeaconNodeApi beaconNodeProxy = testServiceProvider.GetService <IBeaconNodeApi>();

            beaconNodeProxy.ShouldBeOfType(typeof(BeaconNodeProxy));
            ulong genesisTime = await beaconNodeProxy.GetGenesisTimeAsync(CancellationToken.None);

            // Assert
            genesisTime.ShouldBe(1578009600uL);
        }
        public async Task TestValidators80DutiesForEpochOneHaveExactlyOneProposerPerSlot()
        {
            // Arrange
            IServiceCollection testServiceCollection = TestSystem.BuildTestServiceCollection(useStore: true);

            testServiceCollection.AddSingleton <IHostEnvironment>(Substitute.For <IHostEnvironment>());
            testServiceCollection.AddSingleton <IEth1DataProvider>(Substitute.For <IEth1DataProvider>());
            testServiceCollection.AddSingleton <IOperationPool>(Substitute.For <IOperationPool>());
            ServiceProvider testServiceProvider = testServiceCollection.BuildServiceProvider();
            BeaconState     state      = TestState.PrepareTestState(testServiceProvider);
            IForkChoice     forkChoice = testServiceProvider.GetService <IForkChoice>();
            // Get genesis store initialise MemoryStoreProvider with the state
            IStore store = testServiceProvider.GetService <IStore>();
            await forkChoice.InitializeForkChoiceStoreAsync(store, state);

            TimeParameters timeParameters     = testServiceProvider.GetService <IOptions <TimeParameters> >().Value;
            int            numberOfValidators = state.Validators.Count;

            Console.WriteLine("Number of validators: {0}", numberOfValidators);
            BlsPublicKey[] publicKeys = TestKeys.PublicKeys(timeParameters).ToArray();

            // Act
            Epoch          targetEpoch         = new Epoch(1);
            var            validatorPublicKeys = publicKeys.Take(numberOfValidators).ToList();
            IBeaconNodeApi beaconNode          = testServiceProvider.GetService <IBeaconNodeApi>();

            beaconNode.ShouldBeOfType(typeof(BeaconNodeFacade));

            int validatorDutyIndex = 0;
            List <ValidatorDuty> validatorDuties = new List <ValidatorDuty>();
            var validatorDutiesResponse          =
                await beaconNode.ValidatorDutiesAsync(validatorPublicKeys, targetEpoch, CancellationToken.None);

            foreach (ValidatorDuty validatorDuty in validatorDutiesResponse.Content)
            {
                validatorDuties.Add(validatorDuty);
                Console.WriteLine("Index [{0}], Epoch {1}, Validator {2}, : attestation slot {3}, shard {4}, proposal slot {5}",
                                  validatorDutyIndex, targetEpoch, validatorDuty.ValidatorPublicKey, validatorDuty.AttestationSlot,
                                  (ulong)validatorDuty.AttestationShard, validatorDuty.BlockProposalSlot);
                validatorDutyIndex++;
            }

            Console.WriteLine();
            Console.WriteLine("** ValidatorDuty summary");
            foreach (ValidatorDuty validatorDuty in validatorDuties)
            {
                Console.WriteLine("Index [{0}], Epoch {1}, Validator {2}, : attestation slot {3}, shard {4}, proposal slot {5}",
                                  validatorDutyIndex, targetEpoch, validatorDuty.ValidatorPublicKey, validatorDuty.AttestationSlot,
                                  (ulong)validatorDuty.AttestationShard, validatorDuty.BlockProposalSlot);
            }

            // Assert
            Dictionary <Slot, IGrouping <Slot, ValidatorDuty> > groupsByProposalSlot = validatorDuties
                                                                                       .Where(x => x.BlockProposalSlot.HasValue)
                                                                                       .GroupBy(x => x.BlockProposalSlot !.Value)
                                                                                       .ToDictionary(x => x.Key, x => x);

            groupsByProposalSlot[new Slot(8)].Count().ShouldBe(1);
            groupsByProposalSlot[new Slot(9)].Count().ShouldBe(1);
            groupsByProposalSlot[new Slot(10)].Count().ShouldBe(1);
            groupsByProposalSlot[new Slot(11)].Count().ShouldBe(1);
            groupsByProposalSlot[new Slot(12)].Count().ShouldBe(1);
            groupsByProposalSlot[new Slot(13)].Count().ShouldBe(1);
            groupsByProposalSlot[new Slot(14)].Count().ShouldBe(1);
            //groupsByProposalSlot[new Slot(15)].Count().ShouldBe(1);
            validatorDuties.Count(x => !x.BlockProposalSlot.HasValue).ShouldBe(numberOfValidators - 7);
        }