cryptic-game / cryptic-device Goto Github PK
View Code? Open in Web Editor NEWThe offical device microservice of Cryptic
Home Page: https://cryptic-game.net/
License: GNU Affero General Public License v3.0
The offical device microservice of Cryptic
Home Page: https://cryptic-game.net/
License: GNU Affero General Public License v3.0
Describe the bug
file/all
sends a requests to cryptic-service but without device_uuid
.
Expected behavior
Microservice has to respond.
tested browser:[Firefox(with uMatrix),Chrome]
yesterday was it normal/ y hadnt had this bug Yesterday.
an example terminal session
touch test XXXXXX23-XeXc-XXXX-XXXX-XXXXXXXf00db XXXXXXXXXX
morphcoin look test
ls
help
Describe the feature you would like
When a device is deleted in /device/delete
the hardware should be put back into the users inventory.
Describe the feature you would like
An endpoint which lists all hardware parts that are available should be added. Essentially, it should return the hardware
variable from vars.py
. For example /hardware/list
, /hardware/parts
or /hardware/available
.
Is your feature request related to a problem? Please describe.
The frontend or user currently does not have access to the available parts and the properties of them.
Describe the bug
It is possible to turn a remote (hacked) device on if it was turned off before, even if the user is not the owner of the device. Also switched off devices can show up in spot
, which should not be possible.
Describe the bug
Wrong Query see this: https://stackoverflow.com/questions/3029321/troubleshooting-illegal-mix-of-collations-error-in-mysql
To Reproduce
When calling /file/create/
Expected behavior
No error clean queries.
Screenshots
Download server log
https://cdn.discordapp.com/attachments/584070727758643230/584070819655843852/device.log
Solution
single query
Describe the bug
When calling the /hardware/process
user endpoint with an invalid service_uuid
the endpoint does not check whether the service exists.
Expected behavior
The /hardware/process
endpoint should check whether the service exists and if not return a service_not_found
error.
Describe the bug
Errors are fucking weird.
Expected behavior
Something like: {"error":"error message"} instead of {"ok":False, "error":"error messages"}
Solution
change it
Additional context
For consistency
Describe the feature you would like
Add an index as attribute in each hardware component.
Change in vars.py - the same in ms inventory.
The index must be identical in device and inventory.
Additional context
Frontend need an index for the hardwareshop. In the hardware shop the characteristics of each individual hardware should be displayed.
Describe the feature you would like
Use decorators for common errors to avoid code duplication and to simplify unit tests.
Describe the bug
Any directory that is directly contained in the root directory of a device can be moved into itself.
Additional Comments
https://github.com/cryptic-game/cryptic-device/blob/experimental/app/resources/file.py#L85
Failing Integration Test
https://github.com/cryptic-game/integration-tests/blob/dbea37cfa9b45a008e29614c99d590619d5e9466/tests/test_files.py#L406
Describe the feature you would like
The file/create
endpoint should not allow empty filenames and filenames with special characters.
Is your feature request related to a problem? Please describe.
In the official frontend, files with empty filenames cannot be deleted and mostly not interacted with because only spaces aren't own arguments for commands in the terminal. Furthermore, when we have folder structures with paths etc., files with slashes for example, would most likely not be treated correctly.
Describe the feature you would like
The error messages of the endpoints should be as short as possible and in snake_case (lowercase with underscores).
Is your feature request related to a problem? Please describe.
New convetions.
Describe the feature you would like
Split the file/update
endpoint into file/move
for renaming or moving a file and file/update
for updating the content of a file.
Is your feature request related to a problem? Please describe.
The file/update
endpoint seems to be broken.
Describe the feature you would like
Add the Pipfile.lock
file generated by pipenv.
Is your feature request related to a problem? Please describe.
Pipfile.lock
takes some time when running the automated tests or building the Docker image.Describe the feature you would like
build that in.
cryptic-game/python3-lib#2
Is your feature request related to a problem? Please describe.
improve validation.
Additional context
skip
Describe the feature you would like
Second Endpoint for creating a device for new players.
Is your feature request related to a problem? Please describe.
.
Additional context
.
We need to add a delete_user
endpoint which is called by the server when a user is going to be deleted.
The endpoint has to delete all to the given user related information.
Describe the bug
When a user has a very large inventory and tries to build a new device by using the device/create
endpoint the check_exists
function fails to receive the entire inventory because this json object would be too long.
Solution
Use the inventory/summary
endpoint to receive the user's inventory instead.
Describe the bug
When a wallet is deleted, which is connected to a miner, the miner keeps running.
Expected behaviour
When a wallet is deleted, which is connected to a miner, the miner should be stopped, and should not save the mined Morphcoin.
Describe the feature you would like
For every user and microservice endpoint check the associated function.
Is your feature request related to a problem? Please describe.
When checking for availability of the endpoints they may still be connected to a wrong function
Describe the bug
While naming something, e.g. a device using the "hostname" command, no limit regarding the amount of possible characters is set. This leads to the device microservice ending up in a irrecoverable state due to a SQL error, leading it to not respond.
Expected behavior
The maximum amount of characters for e.g. a device or a username should be limited to e.g. 15 characters.
Reproduce
It is recommended to not attempt to reproduce this error on the public infrastructre.
Solution
The easiest solution would be to check for the size of the given string and reject it if it exceeds a set size (e.g. 15 characters)
Describe the bug
The /device/delete
endpoint allows part owners to delete devices remotely
Expected behavior
The endpoint should only allow the real owner to delete the device. Otherwise it should return a permission_denied
error.
Describe the feature you would like
Implement new formulas for RAM, GPU and disk performance created by gamedesign in this document: https://docs.google.com/document/d/19vbkEj5b9yNcFleT_xenGznNDC-IYJoNp7RyUcDfXNk/edit#
(Chapter Systemauslastung)
into game_content.py function "calculate_power".
Describe the feature you would like
Creating new devices with special hardware resulting in better performance for running services.
Is your feature request related to a problem? Please describe.
depending on Inventory
Additional context
Add any other context or screenshots about the feature request here.
Describe the feature you would like
To improve the filesystem we need directories. The root path is /
(inspired by unix).
Describe the feature you would like
When creating a new device call the /device_init
endpoint in cryptic-service.
Additional context
cryptic-game/cryptic-service#66
Is your feature request related to a problem? Please describe.
The start device cannot be deleted.
Describe the solution you'd like
The start device cannot be deleted
Additional Comments
All other computers can be deleted.
Info: Start device is created with click in the frontend.
Describe the bug
microservice was initialized twice
Solution
move main entrypoint from app.py to main.py
Describe the bug
sqlalchemy statement error while .count() alternatively use func.count() or workaround
len(query().all())
To Reproduce
see sentry
Expected behavior
-.
Screenshots
.
Solution
.
Additional context
.
Describe the feature you would like
Endpoint which return information about a process how many resource points it consumes. So that the frontend can show the right increase of currency points.
Is your feature request related to a problem? Please describe.
Front end needs information about processes.
Additional context
.
Describe the bug
Division by zero error in generate_scale
function in game_content.py
To Reproduce
see https://sentry.the-morpheus.de/cryptic/backend/issues/62/?query=is%3Aunresolved
Describe the feature you would like
When a device is powered off it should not be possible to interact with it. This affects the /device/change_name
endpoint and the file endpoints. Also add a ms endpoint other microservices can use to check if a device is turned on.
Describe the feature you would like
Use GitHub Actions instead of Travis
Describe the feature you would like
Add unit tests for Test-driven Development
Is your feature request related to a problem? Please describe.
Tests are needed for TDD
I think there should be an option to buy more "space" for devices, so you can higher the maximum and build more devices
Its hard for players who are already maxed out ;D
Describe the feature you would like
Upgrade to use database wrapper from python3-lib.
Is your feature request related to a problem? Please describe.
No.
Additional context
None.
Describe the feature you would like
Returns the User uuid from the owner of an given device.
Is your feature request related to a problem? Please describe.
The Service micro-service has to know who is the owner when you create an service
Additional context
skip
Describe the feature you would like
The message that notifies about a change in the computer resource usage ({"cpu": x, "ram": y, "gpu": z, "disk": a, "network": b}
) should get an identifier and a key for the microservice that change comes from. For example:
{
"notify-id": "resource-usage",
"origin": "service",
"cpu": 0.2,
"ram": 0.526,
"gpu": 0.4,
"disk": 0.6,
"network": 0.762
}
or something like that. It should be clearly distinguishable as a notification apart from a request and it should be relatable to the resource usage. The notify-id
part should be in all notifications like this in the future.
Is your feature request related to a problem? Please describe.
The current message cannot be easily related to the resource usage. You would first need to check if the message has the keys cpu
, ram
, gpu
, disk
and network
to relate it to the resource usage.
Describe the feature you would like
Add a limit of 3 devices per user
Describe the feature you would like
Please merge the game design parameters of microservice device and inventory in the rewrite of the backend.
Is your feature request related to a problem? Please describe.
Currently, hardware components, prices, index and categories are in two different files. This is error-prone and confusing.
Additional context
For now, the parameters can be managed in a file. However, editing them in a single file would be more convenient.
As more and more parameters are added, we will probably have to think of another way to edit them in the future.
For questions please contact @DevMimas
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.