decrypto-org / blockchain-course

An interactive course on blockchain science and engineering
MIT License
14 stars 11 forks source link

Improvements #25

Closed cnasikas closed 5 years ago

cnasikas commented 5 years ago
dionyziz commented 5 years ago

Push these and let's move forward. We can do a review together later.

On Tue, Feb 12, 2019, 13:53 Christos Nasikas <notifications@github.com wrote:

@cnasikas https://github.com/cnasikas requested your review on: #25 https://github.com/decrypto-org/blockchain-course/pull/25 WIP: Improvements.

— You are receiving this because your review was requested. Reply to this email directly, view it on GitHub https://github.com/decrypto-org/blockchain-course/pull/25#event-2133471956, or mute the thread https://github.com/notifications/unsubscribe-auth/AAhPPKTT1GGJ8HXG_xuTetxTVGMpKzJ8ks5vMqswgaJpZM4a2Ofu .

cnasikas commented 5 years ago

Ok!

cnasikas commented 5 years ago

The CLI refactor allows to run exercises without the need of api and app. You can generate aux and judge your assignments. I hope this feature would speed up the process of assignment creation and make it easier for you guys. Please test it!!

Examples:

node cli.js generate aux proof-of-work
node cli.js generate aux proof-of-work --user.id=2 --user.username='foo'
node cli.js judge proof-of-work --solution 'a_solution' --aux.public=2
node cli.js judge simple-storage --solution=/Users/cnasikas/workspace/solidity/SimpleStorage.sol --file
OrfeasLitos commented 5 years ago

cli returns error either way:

$ node cli/cli.js generate aux db/assignments/proof_of_work 
sequelize deprecated String based operators are now deprecated. Please use Symbol based operators for better security, read more at http://docs.sequelizejs.com/manual/tutorial/querying.html#operators db/node_modules/sequelize/lib/sequelize.js:242:13
2037036
info: Skipping non-assignment {"file":"/blabla/repositories/blockchain-course/db/assignments/proof_of_work/prove.js","meta":{"file":"/blabla/repositories/blockchain-course/db/assignments/proof_of_work/prove.js"}}
An error has occured: Resource not found
➜  blockchain-course git:(pr) ✗ node cli/cli.js generate aux proof_of_work
sequelize deprecated String based operators are now deprecated. Please use Symbol based operators for better security, read more at http://docs.sequelizejs.com/manual/tutorial/querying.html#operators db/node_modules/sequelize/lib/sequelize.js:242:13
2037036
info: Skipping non-assignment {"file":"/blabla/repositories/blockchain-course/db/assignments/proof_of_work/prove.js","meta":{"file":"/blabla/repositories/blockchain-course/db/assignments/proof_of_work/prove.js"}}
An error has occured: Resource not found
cnasikas commented 5 years ago

cli returns error either way:

$ node cli/cli.js generate aux db/assignments/proof_of_work 
sequelize deprecated String based operators are now deprecated. Please use Symbol based operators for better security, read more at http://docs.sequelizejs.com/manual/tutorial/querying.html#operators db/node_modules/sequelize/lib/sequelize.js:242:13
2037036
info: Skipping non-assignment {"file":"/blabla/repositories/blockchain-course/db/assignments/proof_of_work/prove.js","meta":{"file":"/blabla/repositories/blockchain-course/db/assignments/proof_of_work/prove.js"}}
An error has occured: Resource not found
➜  blockchain-course git:(pr) ✗ node cli/cli.js generate aux proof_of_work
sequelize deprecated String based operators are now deprecated. Please use Symbol based operators for better security, read more at http://docs.sequelizejs.com/manual/tutorial/querying.html#operators db/node_modules/sequelize/lib/sequelize.js:242:13
2037036
info: Skipping non-assignment {"file":"/blabla/repositories/blockchain-course/db/assignments/proof_of_work/prove.js","meta":{"file":"/blabla/repositories/blockchain-course/db/assignments/proof_of_work/prove.js"}}
An error has occured: Resource not found

You need to pass the ID (name) of the assignment and not the file path. That's why you get An error has occurred: Resource not found

The info: Skipping non-assignment info indicates that the class exported in prove.js is not an instance of BaseJudge. Would you mind posting prove.js

About 2037036 I can't reproduce it. Seems as a solution of proof-of-work is printed somewhere in your code.

cnasikas commented 5 years ago

@dionyziz @OrfeasLitos I am thinking to merge. Because we are in rush I think is better to develop fast with new features and maybe small bugs than the opposite. What do you think ?

OrfeasLitos commented 5 years ago

I don't want to drag you behind, so I'm OK with the risk of merging before reviewing.

dionyziz commented 5 years ago

Yes

On Sun, Feb 17, 2019, 13:31 Orfeas Stefanos Thyfronitis Litos < notifications@github.com wrote:

I don't want to drag you behind, so I'm OK with the risk of merging before reviewing.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/decrypto-org/blockchain-course/pull/25#issuecomment-464492020, or mute the thread https://github.com/notifications/unsubscribe-auth/AAhPPOKLyCSxOAjYNhndg97BSGyKznaJks5vOaAPgaJpZM4a2Ofu .