-
Notifications
You must be signed in to change notification settings - Fork 489
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Goal remote node config #2904
Comments
It is possible to "trick" goal by creating a directory with algod.net and algos.token in it. That should certainly be made easier by using environment variables or command line switches to supply address and token. To really ease getting started, goal probably also needs a way to accept private keys for signing operations, rather than always expecting a kmd to talk to. |
yep, got this sort of working by just pointing to algoexplorerapi.io but there are a number of functions expecting v1 algod payloads, which algoexplorer doesn't seem to support anymore. I can start to run thru them if you think this is worthwhile.
I figured a local KMD assumption would be ok, easier to setup than a node. But happy to see anything that would make it even easier to setup. Especially something that'd let you install the goal bin as a standalone package |
I'm reluctant to change one hardcoded protocol (http) for another (https). An option: If ALGOD_ADDRESS and ALGOD_TOKEN environment variables are set, then prefer them to the files in the datadir, and, in fact, don't require a data directory at all. (Obviously, some of the commands Switching to v2 is somewhat orthogonal, but I guess the issue is that some public algod providers have v1 turned off? Some other ways that goal could be improved to help new users.
|
These are great ideas to improve goal especially for new devs. I expect that to rip out goal would need some design considerations to be discussed, maybe internally? How should I proceed on this? File some more issues? Just start hacking? Just chill tf out and be patient? |
My personal opinion is that removing the need to specify I think that's also true of v1 -> v2 (as a separate PR though). The other ideas (allow specifying keys, make goal go gettable) would probably need considerably more buy-in, so I wouldn't jump into working on them. I think you could make issues, with as much detail as possible, and that might be the first step in getting that buy-in. |
Env var |
But that var requires you set up files to "trick" algod. You have to
create a directory, and create files to hold the token and address. It's
pretty weird if your real intent is just to make `goal` talk to an
internet accessible `algod` instead of a local one. Also, algod.net only
has the host and port, it's presumed to be `http`. An ALGOD_ADDRESS var
would probably contain the protocol. (I suppose that would be the truly
smallest useful PR - make it so algod.net can specify the protocol if it
wants, so at least the "trick" works)
I have noticed as I browse goal source that it would be super invasive to
make the earlier ALGOD_ADDRESS change I recommended, by the way. We use
the datadir all over the place as a way to pass around a lot of context -
how to contact kmd, algod, etc.
…On Tue, Sep 28, 2021 at 11:23 AM Brian Olson ***@***.***> wrote:
Env var $ALGORAND_DATA=foo currently exists as an alternative to goal -d
foo; extending that along with extending other ways of specifying
net&token makes sense to me.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#2904 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADL7TZJMKERI6INGS2HCHTUEHMYHANCNFSM5EGR2T5Q>
.
|
+1. Developing locally against a node using shell scripts and goal is integral to our workflow. We have a private node running on a hosting provider that we can only currently interact with via the SDKs, which is not ideal for the prototyping stage of our contracts, so we have resorted to spinning up local networks and populating them with the requisite accounts and assets in order to test out specific contracts. |
+1 to this as well. It would be a great quality of life improvement. |
PR to migrate the goal client from v1->v2 might allow goal to use remote v2 providers: #4684 |
Hi, I created this PR #4922 |
Problem
When getting started, goal is often the easiest method to start sending transactions. This ease is complicated by the need to have a node installed to get config/make requests.
Solution
Allow a config option for an Algod client that makes requests to a remote API.
@nullun pointed out that the algod.net file has the ip/port for a REST api. Pointing it to
algoexplorerapi.io:443
worked to get node status on the cli after tweaking:It looks like the rest client has a number of the endpoints hardcoded to v1 endpoints/data structures
go-algorand/daemon/algod/api/client/restClient.go
Lines 361 to 401 in 4b67562
I haven't tested all the endpoints yet.
Dependencies
goal, libgoal
The text was updated successfully, but these errors were encountered: