fenilgmehta / cs765-simulate-p2p-cryptocurrency-network Goto Github PK
View Code? Open in Web Editor NEWSimulation of a P2P Cryptocurrency Network
License: GNU General Public License v3.0
Simulation of a P2P Cryptocurrency Network
License: GNU General Public License v3.0
Node.__init__(...)
seems to create problem with block mining power (i.e. Node.T_k_exp_block_mining_mean
)numpy.random.exponential()
in the code) in the third formula, can make a node with low hashing power mine blocks very fast and a node with high hashing power mine blocks slowly.Please have a look at the below lines of code:
The message of the print statement and the variables being used do not seem logically correct
The following error occurred during execution (ignore the line numbers as code was modified before execution)
Traceback (most recent call last):
File "simulator.py", line 1644, in <module>
Main(vars(args))
File "simulator.py", line 1564, in Main
status = mySimulator.execute_next_event()
File "simulator.py", line 320, in execute_next_event
event = self.event_queue.pop()
File "simulator.py", line 1193, in pop
return heapq.heappop(self.events)[1]
TypeError: '<' not supported between instances of 'Event' and 'Event'
List[Tuple[float, Event]]
float
values are same for two entries of the event queue which are being compared. So, since first element of the Tuple
are equal, Python automatically compares the elements at index 1 (i.e. the Event
value will be compared using <
operator)__lt__
for class Event
and make the event queue as List[Event]
Tuple[float, Event]
---> Event
because the float value is taken from the Event
object itselfNode.block_generation_count
is getting incorrectly calculatedNode.block_generation_count
needs to be decremented for all occurrences of event.EVENT_BLOCK_CREATE_SUCCESS
when mySimulator.global_time > simulatorParameters.execution_time
src1/simulator.py
https://github.com/fenilgmehta/CS765-Simulate-P2P-CryptoCurrency-Network/blob/main/src1/simulator.py#L324src2/simulator.py
CS765_Report_Assignment-2.pdf
README.md
fileconfig.json
file
__create_connected_graph
method is to be updated to make use of Zeta (ζ)
and number_of_individual_attacker_nodes
ζ
) = fraction of honest nodes an adversary/attacker is connected ton_total_nodes
, number_of_individual_attacker_nodes
and ζ
, and print an appropriate messageA declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.