a package that provides a marketstrategy for whitelisting on golem

Overview

filterms

a package that provides a marketstrategy for whitelisting on golem

watching requestor logs distribute 10 tasks asynchronously is fun. but you can have too much fun sometimes. if this rings true, i present to you the filterms python package (name finalization pending). it allows you to limit your requestor to only assign tasks to a specific provider then obsess over the details! can't wait? read on!

usage

first clone the repo directory into your script directory

$ git clone https://github.com/krunch3r76/filterms

script file setup

add the following import statement to the py script that instantiates the Golem object

from filterms import filterProviderMS

when instantiating the Golem object, assign filterProviderMS to the the named parameter strategy:

    async with Golem(
        budget=10.0,
        subnet_tag=subnet_tag,
        payment_driver=payment_driver,
        payment_network=payment_network,
        strategy=filterProviderMS
    ) as golem:
        #...

general example

set the environment variable and run the script, as in:

requestor$ GNPROVIDER=someprovidername python3 script.py

specific example

you might then run golemsp on testnet (in a separate machine/vm) with:

provider$ golemsp run --payment-network=rinkeby --subnet=devnet-beta

let this provider node be named "jupiter-legacy".

then, on the requestor side (defaulting to testnet), e.g. using the blender example, you can run:

requestor$ GNPROVIDER=jupiter-legacy python3 ./blender.py

and see tasks (in the log) go only to jupiter-legacy!

specific example with a twist

it may be desirable to see how long it takes a file to upload to your provider. blender may be useful for this purpose. create a file of desired length, let's say, 100M, and use it instead of cubes.blend

requestor$ touch randomfile
requestor$ shred -n 1 -s 100M randomfile
requestor$ cp cubes.blend cubes.blend.bak
requestor$ ln -sf randomfile cubes.blend
requestor$ GNPROVIDER=jupiter-legacy python3 ./blender.py

comments

if you do not set the GNPROVIDER environment variable, the script passes the default LeastExpensiveLinearPayuMS to run as normal. ref: https://github.com/golemfactory/yapapi/blob/0.7.0/yapapi/engine.py#L134

conclusion

this is a first rendition of a package/suite that aims to provide more convenience and flexbility to requestors on top of yapapi for testing (current state) or enhancing (planned features). stay tuned for further developments.

You might also like...
This script provides LIVE feedback for On-The-Fly data collection with RELION

README This script provides LIVE feedback for On-The-Fly data collection with RELION (very useful to explore already processed datasets too!) Creating

This repository provides a set of easy to understand and tested Python samples for using Acronis Cyber Platform API.

Base Acronis Cyber Platform API operations with Python !!! info Copyright © 2019-2021 Acronis International GmbH. This is distributed under MIT licens

HatAsm - a HatSploit native powerful assembler and disassembler that provides support for all common architectures

HatAsm - a HatSploit native powerful assembler and disassembler that provides support for all common architectures.

WATTS provides a set of Python classes that can manage simulation workflows for multiple codes where information is exchanged at a coarse level

WATTS (Workflow and Template Toolkit for Simulation) provides a set of Python classes that can manage simulation workflows for multiple codes where information is exchanged at a coarse level.

Example python package with pybind11 cpp extension

Developing C++ extension in Python using pybind11 This is a summary of the commands used in the tutorial.

qecsim is a Python 3 package for simulating quantum error correction using stabilizer codes.

qecsim qecsim is a Python 3 package for simulating quantum error correction using stabilizer codes.

A command-line utility that creates projects from cookiecutters (project templates), e.g. Python package projects, VueJS projects.
A command-line utility that creates projects from cookiecutters (project templates), e.g. Python package projects, VueJS projects.

Cookiecutter A command-line utility that creates projects from cookiecutters (project templates), e.g. creating a Python package project from a Python

Unofficial package for fetching users information based on National ID Number (Tanzania)

Nida Unofficial package for fetching users information based on National ID Number made by kalebu Installation You can install it directly or using pi

A toy repo illustrating a minimal installable Python package

MyToy: a minimal Python package This repository contains a minimal, toy Python package with a few files as illustration for students of how to lay out

Comments
  • the strategy does not wrap a non-default strategy

    the strategy does not wrap a non-default strategy

    if a custom strategy is being used by the l-user then this would replace it (by virtue of being passed in as the strategy to Golem( in lieue). this should be addressed by wrapping (or subclassing) a strategy upon construction if desired.

    opened by krunch3r76 1
  • name bearing address could inadvertently be passed unto the address filter

    name bearing address could inadvertently be passed unto the address filter

    currently a white/blacklist prioritizes names over addresses. a bad actor could create a name that is an address and try to get blacklisted. however, once the actor leaves this identity, the address may remain in the white/blacklist and subsequently and unintentionally the eponymous address would be filtered.

    one solution would be to define separate environment variables depending on whether names or addresses shall be filtered. this is the most simple but detracts from the simplicity of the tool a bit. alternatives are swimming in the tank.

    enhancement 
    opened by krunch3r76 0
  • add a feature whitelist

    add a feature whitelist

    instead of whitelisting against names it would be useful to whitelist for certain provider features without fussing with the logic in the requestor code itself by invoking with an environment variable, which could be a json string.

    enhancement 
    opened by krunch3r76 1
Owner
KJM
I am a Silicon Valley native code enthusiast.
KJM
A Python package that provides physical constants.

PhysConsts A Python package that provides physical constants. The code is being developed by Marc van der Sluys of the department of Astrophysics at t

Marc van der Sluys 1 Jan 5, 2022
A test repository to build a python package and publish the package to Artifact Registry using GCB

A test repository to build a python package and publish the package to Artifact Registry using GCB. Then have the package be a dependency in a GCF function.

null 1 Feb 9, 2022
💻 Algo-Phantoms-Backend is an Application that provides pathways and quizzes along with a code editor to help you towards your DSA journey.📰🔥 This repository contains the REST APIs of the application.✨

Algo-Phantom-Backend ?? Algo-Phantoms-Backend is an Application that provides pathways and quizzes along with a code editor to help you towards your D

Algo Phantoms 44 Nov 15, 2022
Socorro is the Mozilla crash ingestion pipeline. It accepts and processes Breakpad-style crash reports. It provides analysis tools.

Socorro Socorro is a Mozilla-centric ingestion pipeline and analysis tools for crash reports using the Breakpad libraries. Support This is a Mozilla-s

Mozilla Services 552 Dec 19, 2022
Vehicle Identification Speed Detection (VISD) extracts vehicle information like License Plate number, Manufacturer and colour from a video and provides this data in the form of a CSV file

Vehicle Identification Speed Detection (VISD) extracts vehicle information like License Plate number, Manufacturer and colour from a video and provides this data in the form of a CSV file. VISD can also perform vehicle speed detection on a video. All these features of VSID are provided to the user using a Web Application which is created using Flask

null 6 Feb 22, 2022
skimpy is a light weight tool that provides summary statistics about variables in data frames within the console.

skimpy Welcome Welcome to skimpy! skimpy is a light weight tool that provides summary statistics about variables in data frames within the console. Th

null 267 Dec 29, 2022
pvaPy provides Python bindings for EPICS pvAccess

PvaPy - PvAccess for Python The PvaPy package is a Python API for EPICS7. It supports both PVA and CA providers, all standard EPICS7 types (structures

EPICS Base 25 Dec 5, 2022
Provides guideline on how to configure pre-commit hooks in your own python project

Pre-commit Configuration Guide The main aim of this repository is to act as a guide on how to configure the pre-commit hooks in your existing python p

Faraz Ahmed Khan 2 Mar 31, 2022
Blender Add-on That Provides Quick Access to Render Controls

Blender Render Buttons Blender Add-on That Provides Quick Access to Render Controls A Blender 3.0 compatablity update of Blender2.8x-RenderButton v0.0

Don Schnitzius 3 Oct 18, 2022
LTGen provides classic algorithms used in Language Theory.

LTGen LTGen stands for Language Theory GENerator and provides tools to implement language theory. Command Line LTGen is a collection of tools to imple

Hugues Cassé 1 Jan 7, 2022