Coder Social home page Coder Social logo

entropythief's People

Contributors

krunch3r76 avatar krunch3r76alt avatar mat7ias avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

entropythief's Issues

shutdown takes too long after task

during the mixing and writing of the random bytes to the pipe writer and the view, a shutdown waits until all of it has been written. short-circuiting the sending of the bytes sent to the view could solve the issue but may require adding a separate asyncio communication channel (i.e. queue) which contains only metadata such as events.

additionally, a shared variable can be set so that the controller can recognize whenever Golem is not mid-task.

PipeReader does not properly detect and handle a stale file descriptor

when a reader has been attempting to read from the same file descriptor to which a former process was writing and that former process has exited, there appears to be a need to recreate the pipe for the new process to see it (sometimes), ie assign a new file descriptor. this is being investigated.

download_bytes does not appear to place nice with asynchrony

currently it has been necessary to await each task download, but the asynchronous model is designed to attend to many pending io operations (as from other tasks) at once. the problem may be with the callback, and that is being investigated as of this writing (at tag alpha-v7.4)

spurious rewrites on pipe_writer

the logic in pipe_writer is causing bytes to be rewritten. it has been mitigated some by removing calls to poll that does not play nice with asyncio. a redesign is in progress.

a wallet that runs out of funds completely is not handled gracefully

entropythief will report this:

The model threw the following exception:
ApiException
(400)
Reason: Bad Request
HTTP response headers: <CIMultiDictProxy('Content-Length': '51', 'Content-Type': 'application/json', 'Date': 'Thu, 05 Aug 2021 04:29:01 GMT')>
HTTP response body: {"message":"Insufficient funds to make allocation"}

not sure how i want to handle this generic exception or how i might be proactive about it.

exception of type ya_market.exceptions.ApiException not handled gracefully during exit

[2021-08-10T13:33:25.497-0700 DEBUG yapapi.rest.market] terminateAgreement(d488072e6b509da6a4cd53f367d669eee2a10175797e6cf91c405f30cf6c36e1) failed
Traceback (most recent call last):
  File "./entropythief.py", line 389, in <module>
    loop.run_until_complete(task)
  File "/usr/lib/python3.8/asyncio/base_events.py", line 603, in run_until_complete
    self.run_forever()
  File "/usr/lib/python3.8/asyncio/base_events.py", line 570, in run_forever
    self._run_once()
  File "/usr/lib/python3.8/asyncio/base_events.py", line 1823, in _run_once
    event_list = self._selector.select(timeout)
  File "/usr/lib/python3.8/selectors.py", line 468, in select
    fd_event_list = self._selector.poll(timeout, max_ev)
KeyboardInterrupt

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/krunch3r/.local/lib/python3.8/site-packages/yapapi/rest/market.py", line 85, in terminate
    await self._api.terminate_agreement(self._id, request_body=reason)
  File "/home/krunch3r/.local/lib/python3.8/site-packages/ya_market/api_client.py", line 205, in __call_api
    raise e
  File "/home/krunch3r/.local/lib/python3.8/site-packages/ya_market/api_client.py", line 193, in __call_api
    response_data = await self.request(
  File "/home/krunch3r/.local/lib/python3.8/site-packages/ya_market/rest.py", line 268, in POST
    return await self.request(
  File "/home/krunch3r/.local/lib/python3.8/site-packages/ya_market/rest.py", line 180, in request
    raise ApiException(http_resp=r)
ya_market.exceptions.ApiException: (500)
Reason: Internal Server Error
HTTP response headers: <CIMultiDictProxy('Content-Length': '446', 'Content-Type': 'application/json', 'Date': 'Tue, 10 Aug 2021 20:33:25 GMT')>
HTTP response body: {"message":"Protocol error while terminating: Terminate Agreement [R-d488072e6b509da6a4cd53f367d669eee2a10175797e6cf91c405f30cf6c36e1] GSB error: Remote service at `/net/0x69b0bd0dab9946f6f1a32eba89df43231c45413d/market/protocol/mk1/negotiation/provider/agreement/AgreementTerminated` error: Called service `/net/0x69b0bd0dab9946f6f1a32eba89df43231c45413d/market/protocol/mk1/negotiation/provider/agreement/AgreementTerminated` is unavailable.."}

test null hypothesis to show it is truly random (connotatively)

entropythief defies the traditional definition of randomness of having "statistical independence, uniform distribution, and unpredictability". showing if some or all of these criteria are violated may actually prove entropythief is fulfilling its design purpose.

high cpu utilization during work

there is utilization on 1 core that often goes to 100% while the pipe is being actively read. this is a suspected entropythief issue that should be resolved by making PipeWriter sleep requiring an asynchronous partial interface (or hopefully not a complete asynchronous redesign) where time is yielded to the cpu without blocking. currently it is "unblocking"

multiple named pipes model breaks

multiple named pipes brings about problems with undefined system hard limits and such when reading hundreds of megabytes of randomness. i have learned much about named pipes and am reprogramming to use a single named pipe (this time as it is meant to be used :-p -- or at least more the unix way having learned) and buffering inside an object.

status line buffer count not updated during new task provisioning

if the named pipe is being continually read from, the status line won't reflect this real-time during provisioning of new work.
two targets to consider:
TaskResultWriter might be able to communicate this information to the controller
A task itself might have a callback in its data to refresh and inform the controller.

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.