Algorand Environment on Mac

Hi,

I am new to Algorand, i am trying to setup an environment for development, i started a node, but i am not able to install the devTools, i dunno i am missing, i tried to go through all the documentation again, but didn’t find anything helpful.

Any help will be appreciated.

Thanks.

Welcome @zeeshanmazhar glad you are here, let’s get you sorted :slight_smile:

Please help me understand the documentation you followed already, so I can make changes to improve going forward. Did you read within the README.md of the GitHub repo, or a page(s) within the Developer Portal? It seems you have algod running by now. It’s not clear if your node is in sync yet, so can you try goal node status and post back the results. You will need to be in sync prior to broadcasting your first transaction.

1 Like

Hey Ryan,

Thanks for your reply.

I think i am missing something, i followed the instruction from Here

When i run the goal node status, it shows me an error “zsh: command not found: goal”.

Seems like goal is not in your PATH. The installer should take care to add it. What do you find in your ~/node directory?
$ ls -la ~/node

You can see the node directory files in the attached screenshot :

Good news: you have everything installed as expected. I see tealdbg and other devTools. So, this folder must not be in your PATH. Confirm by reviewing the results from:

$ echo $PATH

It needs to include ~/node in that string. It’s possible you can resolve this by closing your established terminal session and starting a new one, as the $PATH is established when the session begins (not updated by the installer).

this shows me :

/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin

Can you please check this?

Right, I see the install script for Mac is not setting the $PATH as expected. Therefore, you must set it manually for now (I’ll raise a ticket to correct this behavior).

$ export PATH=$PATH:~/node

That will add the ~/node directory to your $PATH environment variable for this session. If you want to make this permanent, please review the appropriate documentation for your OS version and shell:

1 Like

Yeah, now it’s working.

Thanks a lot Ryan, Really Appreciated.

Also one more thing, for fastcatchup:

i have to run ./goal node start -d ~/node/datafastcatchup
but i don’t have any datafastcatchup folder in node, should i create it ?

Can you please instruct me on this ?

Thanks.

You may execute the goal node start and goal node catchup commands based on any directories you choose as instructed here. It’s no problem to do the catchup in the ~/node directory.

1 Like

Also i tired this :
./goal node catchup 9630000#TC7G63KVOYPB3V5X2GU6WVIRKIWKYFNY6RYTAG7DLLC5PQKZG5IQ -d ~/node/datafastcatchup

But it giving me error :
could not make cachedir: mkdir /Users/zeeshanmazhar/node/datafastcatchup/goal.cache: no such file or directory

Thanks,
Zeeshan

Give this a try:

./goal node catchup 9630000#TC7G63KVOYPB3V5X2GU6WVIRKIWKYFNY6RYTAG7DLLC5PQKZG5IQ -d ~/node
1 Like

its giving me this error:

Cannot contact Algorand node: open /Users/zeeshanmazhar/node/algod.token: no such file or directory.

Please ensure the node is running prior to performing the catchup. Use goal node status to verify :wink:

DATA="~/node"
CATCHUP="9630000#TC7G63KVOYPB3V5X2GU6WVIRKIWKYFNY6RYTAG7DLLC5PQKZG5IQ"
./goal node start -d $DATA
./goal node status -d $DATA
./goal node catchup $CATCHUP -d $DATA

Hey ryan,

these commands are also not working.
Can you please check the screenshot:

Also after extracting the binary, where to run algorand-indexer daemon -h ?

From your goal node status -d data output I see that algod is running (although it looks stuck because the “Last committed block” is old and “Sync time” is not increasing (until fully syncedd). Also, this node is connected to the MainNet as indicated by “Genesis ID” and “Genesis hash”. If you want to connect to TestNet or BetaNet, please review Switching Networks documentation.

Let’s restart your node:

goal node restart -d data

Next, let’s execute goal node status -d data a couple of times about 5 seconds apart. We expect to see the “Sync Time” value increasing. Then, let’s perform the fast catchup:

goal node catchup $CATCHUP -d data 

Notice that you are executing goal from the ~/node directory. Your MainNet data folder is actually at ~/node/data

Yeah now i understand more, can you please guide me on indexers, after extracting the binary, where to run algorand-indexer daemon -h ?

Yes, @zeeshanmazhar happy to help with algorand-indexer as well. However, I’m going to suggest you open a new thread for that, as this one feels “done” related to setting up the algod node.

I’ll wrap it up with an important note about the relationship between algod and algorand-indexer:
An indexer is incompatible with a node synced using Fast Catchup (as discussed earlier in this thread). Indexer requires access to an archival node to query all block history in order to buildout its local indexed copy of blockchain data.

1 Like