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

model=1 give an error #8

Open
tienquyet28 opened this issue Feb 7, 2023 · 2 comments
Open

model=1 give an error #8

tienquyet28 opened this issue Feb 7, 2023 · 2 comments

Comments

@tienquyet28
Copy link

I try to conduct experimential like wise in your paper. when i set input model =1 👍
Configuration like: Binterval=600 # Average time (in seconds)for creating a block in the blockchain
Bsize = 1.0 # The block size in MB
Bdelay =2 # average block propogation delay in seconds, #Ref: https://bitslog.wordpress.com/2016/04/28/uncle-mining-an-ethereum-consensus-protocol-flaw/
Breward = 12.5 # Reward for mining a block

    ''' Transaction Parameters '''
    hasTrans = True  # True/False to enable/disable transactions in the simulator
    Ttechnique = "Light"  # Full/Light to specify the way of modelling transactions
    Tn = 10  # The rate of the number of transactions to be created per second
    # The average transaction propagation delay in seconds (Only if Full technique is used)
    Tdelay = 5.1
    Tfee = 0.000062  # The average transaction fee
    Tsize = 0.000546  # The average transaction size  in MB

    ''' Node Parameters '''
    Nn = 5  # the total number of nodes in the network
    NODES = []
    from Models.Bitcoin.Node import Node
    # here as an example we define three nodes by assigning a unique id for each one + % of hash (computing) power
     **NODES = [Node(id=0, hashPower=40), Node(
        id=1, hashPower=30), Node(id=2, hashPower=15),Node(id=3, hashPower=10),Node(id=4, hashPower=5)]**

    ''' Simulation Parameters '''
    simTime = 1000  # the simulation length (in seconds)
    Runs = 10  # Number of simulation runs

I got error like these 👍

File "/home/quyet/PycharmProjects/BlockSim/BlockSim/Main.py", line 66, in main
Consensus.fork_resolution() # apply the longest chain to resolve the forks
File "/home/quyet/PycharmProjects/BlockSim/BlockSim/Models/Bitcoin/Consensus.py", line 43, in fork_resolution
z = np.bincount(c)
File "<array_function internals>", line 200, in bincount
TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'

Process finished with exit code 1

Still i get the results in excel file : like stale rate =0; number transaction :3, total transaction :5404; unexpected % mainblock decentralised ; I means same set up as in table 5 of your paper but can get expected results.

Last point
How do you calculate throughput when put model =0 or model=1; as i see no throughput has been put in excel output file

@Ra0R
Copy link

Ra0R commented Apr 11, 2023

Hey there I ran across the same error, there seems to be a fix in this pull request (not verified):

350c8a2

@13959673160
Copy link

I want to ask, excel does not have throughput problem, have you solved it? Would like to consult

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

3 participants