Giter VIP home page Giter VIP logo

comp-2017-cscoins's People

Contributors

arteymix avatar flangelier avatar hugbed avatar isra17 avatar jordsti avatar mbinette91 avatar michaelnecio avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

comp-2017-cscoins's Issues

Submission - No error message

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

Grid - X and Y

To be clear,

The solution is composed of (Y, X) coordinates?

Shortest Path Neighbour Ordering

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.

Message Types

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.

One miner per uni?

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

Nonce format?

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.

Wallet Directory

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

Pay-to-win

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)

typo causing server to crash

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.

Documentation inconsistency

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.

Challenges available during the competition

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?

Abusive clients

What will be done to prevent or determine abusive clients?

ChallengeThread not synced with current challenge

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

RSA key size

Out of curiosity would it be possible for a client to use a larger RSA keypair? (such as a 2048bit key)

Server error on ca_server_info command

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

Grid - Blockers on borders

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

Clarify signatures

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.

Difficulty of challenges

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.

Shortest-path challenge not specified

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

Taille du nonce

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.

Cool down on valid submissions

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

Directly using heapq as priority queue in ShortestPathChallenge breaks the specification

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.

generated_paths.txt

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.

Environment

Hi,

Couple of questions:

  • What is the OS?
  • Are miners-CA communications encrypted (i.e. TLS)? If so, will the miners already have the certificate?
  • Will the teams be able to install missing tools or libraries?
  • Will the teams be able to monitor (SSH or other) and adapt their miners during the event?

Thanks

Server does not boot

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

Which Shortest Path?

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.