G
G
Golem SDK
Search…
Running a requestor on Mainnet
Requestor agent mainnet configuration
In order for the below commands and code to work, your yagna daemon must have the mainnet accounts correctly initialized using the instructions above.
After you have taken care of the above, the one last thing that you'll need to do if you want to request tasks from the providers running on the mainnet is enabling the mainnet driver in your requestor agent.
The examples we bundle with our APIs (the Blender rendering and Hashcat password recovery) expose two command-line arguments, analogous to yagna daemon itself: --driver and --network.
There is a an additional caveat here though.
In order to clearly separate our production network, to which the majority of the provider nodes run by our users connect by default, from the testnet subnet the sole purpose of which should be testing your apps, we have introduced a concept of a "subnet tag".
Whereas the limited number of our own test providers that we make available to our prospective requestors use the devnet-beta subnet (which is included by default in our requestor-facing examples), the mainnet providers use public-beta subnet by default.
Thus, to leverage the computing power of the mainnet providers in the Golem network, you must provide the subnet tag used by those mainnet provider nodes - public-beta.
Therefore, combining those parameters, in order to run our examples on mainnet, you'd launch them using e.g.:
Python
JS
1
python3 blender.py --payment-network=mainnet --subnet-tag=public-beta
Copied!
1
yarn js:blender --payment-network mainnet --subnet-tag public-beta
Copied!

Requestor agent code

As for your own requestor agent code, you'll need to supply the appropriate payment_driver , payment_network and subnet_tag parameters to Golem.
Python
JS
1
async with Golem(
2
[...],
3
payment_network="polygon",
4
payment_driver="erc20",
5
subnet_tag="public-beta",
6
)
Copied!
1
new Executor({
2
driver: "erc20",
3
network: "polygon",
4
subnet_tag: "public-beta",
5
})
Copied!
Copy link