csgames / comp-2017-cscoins Goto Github PK
View Code? Open in Web Editor NEWCSCoin Specification and tools
License: GNU General Public License v3.0
CSCoin Specification and tools
License: GNU General Public License v3.0
Now that the competition is done, I think we can have a showcase of our miner code.
Anyway here's ours: https://github.com/AEDIROUM/cscoin-miner
Hi,
As specified the server is supposed to send an error message when an invalid submission is sent.
At the moment, it does not.
Thanks
To be clear,
The solution is composed of (Y, X) coordinates?
It would be awesome if someone could add a filtering system in the transactions section in the Wallet manager!
Thx!
You state in the documentation that you check the neighbour's for the shortest path in the following order: down, up, right, left.
But then in the solver on line 38:
https://github.com/csgames/cscoins/blob/master/src/caserver/challenges/ShortestPathChallenge.py#L38
You reverse the order if (row + col) % 2 == 0. This will create inconsistencies with the paths generated. Is there a reason for this? I these two lines could be removed and the solver would be consistent with the documentation.
Is it possible to add a type
entry in the responses to dispatch properly the received messages?
The WebSocket protocol does not really ensure a serial request-response flow, so I have to inspect payloads for the existence of some properties, which is somewhat hackish.
Hi,
The docker-client documentation mentions one docker container per university. Is that correct and imply that universities with 2 teams will have to dispute which one will be used?
Thanks for the update
I don't think it's being specified anywhere in the docs and it seems like the database stores a decimal representation of a 64-bit unsigned integer.
In the Wallet Manager, It would be awesome if I could link some label or name (Like the University name) to the wallet ID. So I could see the list of University and their transaction instead of their wallet ID
Je me demandais, si une team peux se payer une fuck ton de d'instance EC2 sur AWS ou a accès à un super ordinateur pour miner des CS Coins, c'est pas un peu un genre "pay-to-win" comme compétition?
(j'ai entendu entre les branches que vous alliez fournir des environnements identiques aux teams)
In caserver/ChallengeThread.py, self.database.get_lastest_client_cooldown is called.
However, caserver/ServerDatabase.py defines get_client_lastest_cooldown.
The typo causes the server to crash.
Also, it's latest, not lastest.
In the documents, it is noted that the submission command takes the wallet_id and noce as parameters however in the reference client it takes challenge_id, nonce, hash, signature, and wallet_id.
Should we expect the current set of challenges to be complete ([shortest_path, sorted_list, reverse_sorted_list]
) or is it possible that new challenges will be added during the competition?
In other words, should we only expect to monitor/debug during the weekend or could there also be developing involved?
What will be done to prevent or determine abusive clients?
Hi,
If challenge parameters are changed during a round, the CT uses the current configuration
rather than the one sent to the client. Since the parameters used to solve the challenge do not
match on both sides, submissions are not accepted.
This is low priority if you do not plan on changing the parameters during
the event. I, however, advise to side with caution and fix this bug.
edit: rephrasing
Out of curiosity would it be possible for a client to use a larger RSA keypair? (such as a 2048bit key)
I was running some tests and the server has an error when sending the repsponse for ca_server_info.
I tried with the payloads:
{"command":"ca_server_info","args":null}
{"command":"ca_server_info","args":{}}
Both cause the server to print an error:
Accepting a connection from 127.0.0.1:60058
(127.0.0.1:60058) Executing command : ca_server_info
Error occurred (Decimal('200') is not JSON serializable) closing connection
Hi,
The specification document does not specify whether we should drop blockers that appear on
borders. Should they be dropped or placed on top?
Thanks
In the register_wallet
command, the raw SHA256 hash of the DER-encoded public key is signed, but in general the signature scheme expect a concatenation of values with a ,
separator.
Thus, I would have expected to simply pass the hexified version of wallet_id
to the signature process (e.g. apply sha256
on the hexified wallet_id
).
Also, the signature protocol does not specify that SHA256 is used.
Will a difficulty be chosen during the weekend such that a block takes an approximate fixed amount of time to be mined (e.g. pick a hash prefix length such that blocks are mined every ~10
minutes)? If you guys will aim for a particular block mining time, would it be possible to know what that timing would be?
Context: our miner does not continually check if the thread is still alive like the reference miner and knowing the order of magnitude of the expected mining time (seconds vs minutes) would help to balance when to check for an early stopping condition.
It seems the sp challenge has been implemented, but its arguments not described in the top README.
If finalized, could you, please, add the parameters to the top README.
Thanks
BIGINT in MySQL is a signed 64 bit integer. Therefore attempting to submit a 64 bit unsigned integer such as 13465558713502331910
results in an error, when it shouldn't.
I think you should be using the SERIAL
type instead.
https://dev.mysql.com/doc/refman/5.7/en/numeric-type-overview.html
Est-ce que la taille du nonce va être connu?
Ça semble être configurable dans le serveur donc j'imagine que les valeurs ne seront pas les mêmes aux CS.
A part poker le serveur en continu y aurait-il manière de savoir si le challenge à été solve? Genre recevoir un push sur le websocket avec le nouveau challenge?
Our miner gets put on cool down even though all submissions are valid. I feel like the cool down should only apply to invalid submissions
The documentation states clearly:
"Find the shortest path. If there's multiple possibility, use the first one, and we check the nearest neighbors in that order : down, up, right, left."
I believe you tried to implement this ordering by inserting the positions in order:
def neighbors(self, pos):
(row, col) = pos
results = [(row+1, col), (row-1, col), (row, col+1), (row, col-1)]
For the priority queue, you used a heapq. In section 8.5.2 of the heapq page, they explain how to use a heapq to build a priority queue. This is not the way ShortestPathChallenge.py builds the heap , resulting in an inherently unstable implementation.
You can easily see this by changing the order of neighbour insertion, and noticing that it won't have an effect on the final path. This is because insertion order does not impact the position of the element in the heap. The ordering will be based first on priority, then on the first and second elements of the tuple.
Since heapq acts as a min-heap, [(row+1, col), (row-1, col), (row, col+1), (row, col-1)], if they have the same priority, will be popped as [(row-1,col),(row,col-1),(row,col+1),(row+1,col)].
So instead of looking at your neighbours in order down,up,right,left, you will instead look at them in order up, left, right, down.
In the file I've included, you will find a comparison of two paths, one generated according to your documentation, and the other generated by your software.
You can use your code to generate this path using last_solution_hash
"215e7dde782ea4c3134f693eb72522f0aafce006afeb50ccd3317724cd4920e5"
and nonce 13349735025080016891.
We can clearly see the issue. While both our paths have the same length, yours goes left instead of down, when you specification says it shouldn't.
The bug results from the fact that you most likely copy-pasted a dijkstra implementation, probably from section 1.3.3 of this this blog, without taking the time to understand the libraries you were using.
Hi,
Couple of questions:
Thanks
In the description, it is the first.
In the example, it is the last.
We updated our copy of the cscoins server to the most recent commit and the server does not boot.
Here are the logs:
Loading wallets from Database
Creating CA Wallet
CA Wallet Id -> b0da514a8da8a0bbbc376c3e3b3c0cf973c0c50b6d3fa103ef8e53bd630ab321
Loading transactions...
No current challenge, generating a new challenge
Generating reverse_sorted_list problem nonce = 87168702
New challenge generated for 15 minutes
Traceback (most recent call last):
File "main.py", line 12, in <module>
ca_server.serve()
File "/cscoins/src/caserver/CentralAuthorityServer.py", line 396, in serve
ssl_context.load_cert_chain(self.ssl_cert)
FileNotFoundError: [Errno 2] No such file or directory
The current specification for the shortest path challenge (in the README) doesn't specify which shortest path to use if multiple exist. In the example shown, going 4 down and then 2 right also gives the same length. The example also doesn't show a preference for which direction to go if multiple work.
The server code given checks a nonce by generating its solution, and checking the hash of that, which will probably be different than the hash of a different solution.
Could we get an official specification of which path to use? If how the current server code generates a solution is the specification, that works; I'm just worried that my code might become wrong if the server solution code gets updated.
A 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.