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

WARNING : Not enough validators and IndexError: list index out of range #3

Open
ghost opened this issue Mar 25, 2020 · 4 comments
Open

Comments

@ghost
Copy link

ghost commented Mar 25, 2020

I have two questions:
First, what is nodeID = (self.topo.rank * self.config.maxNodesPerRank) + i in your network.py using for. Because self.topo.rank is always 0

second, when I ran the test.py, it gave me the following result:

Traceback (most recent call last):
File "/Users/nien-ting/Desktop/shardSim-master/test.py", line 23, in
mySimulation()
File "/Users/nien-ting/Desktop/shardSim-master/test.py", line 20, in mySimulation
sim.run()
File "/Users/nien-ting/Desktop/shardSim-master/shardSim/simulator.py", line 56, in run
self.net.tick()
File "/Users/nien-ting/Desktop/shardSim-master/shardSim/network.py", line 44, in tick
node.tick()
File "/Users/nien-ting/Desktop/shardSim-master/shardSim/node.py", line 167, in tick
self.validate()
File "/Users/nien-ting/Desktop/shardSim-master/shardSim/node.py", line 130, in validate
self.proposers.append(self.currentCommittee[0])
IndexError: list index out of range

could you tell me if I didn't run it right or something.

@leobago
Copy link
Owner

leobago commented Apr 2, 2020

Hello, are you running with multiple processes with MPI? Otherwise, you won't see multiple ranks..

@bing1128
Copy link

bing1128 commented Sep 1, 2021

Hello,I have two questions:
First, Can this code run under PyCharm?
Second,after nodes are sharded, what is the consensus mechanism within the committee?

@bing1128
Copy link

bing1128 commented Sep 1, 2021

Hello,I run this code under PyCharm,the following question arises.
Have you ever had this problem? What's the solution?
please you tell me,thank you so much!

D:\Users\Administrator\Anaconda3\python.exe D:/shardSim/shardSim-master/test.py
** Sharding Simulator ** : Simulator initialized
** Sharding Simulator ** : Simulator bootstrap executed
[00006] : I have mined block 3189 number 7000001 at time 19
[00007] : I have mined block 7da2 number 7000002 at time 62
[00006] : I have mined block 2b7e number 7000003 at time 78
[00006] : I have mined block 4482 number 7000004 at time 88
[00000] : WARNING : Not enough validators
Traceback (most recent call last):
File "D:/shardSim/shardSim-master/test.py", line 23, in
mySimulation()
File "D:/shardSim/shardSim-master/test.py", line 20, in mySimulation
sim.run()
File "D:\shardSim\shardSim-master\shardSim\simulator.py", line 56, in run
self.net.tick()
File "D:\shardSim\shardSim-master\shardSim\network.py", line 38, in tick
node.tick()
File "D:\shardSim\shardSim-master\shardSim\node.py", line 161, in tick
self.validate()
File "D:\shardSim\shardSim-master\shardSim\node.py", line 124, in validate
self.proposers.append(self.currentCommittee[0])
IndexError: list index out of range

Process finished with exit code 1

@leobago
Copy link
Owner

leobago commented Sep 1, 2021

My suspicion is that you are not using MPI and then you do have not enough processes to run the simulation, you should configure your simulation for one single process if you just one to run one single process. However, I want to mention that this simulator was developed 3 years ago and it does not comply with the recent developments on the Eth2 specification.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants