Introduction
Among the many advantages of using blockchains, one that stands out above most is the security and trust in the operations performed (transactions).
Trust is when we have guarantees that all parties involved in a transaction are who they claim to be. This requires the implementation of a system that ensures the authentication of these parties.
Security is when we have a robust cryptographic system that allows the trusted authentication mentioned above.
Confidence will be the consequence of security.
To trust the authentication, a double key system is used to sign each transaction. We can summarize the mechanism in a very simple way:
- The sender uses a private key, known only to him/her, to sign the transaction to be sent.
- The receiver will use the sender’s public key, stored in the blockchain itself along with all the public keys of all the accounts created, and by means of a cryptographic algorithm will be able to verify that whoever signed the transaction is really the same account listed as the sender.
This system only guarantees the authentication of the parties. We must also check if the account that is signing is the one we expect it to be (it is easy to be deceived if they change some character of the account with the result of receiving a correctly signed transaction, but… from another account!) We must also pay attention to the content of the transaction since a correctly signed transaction does not guarantee that its content is what we expect (see the cases of fake NFT transactions).
This system only guarantees the authentication of the parties. We must also check if the account that is signing is the one we expect it to be (it is easy to be deceived if they change some character of the account with the result of receiving a correctly signed transaction, but… from another account!) We must also pay attention to the content of the transaction since a correctly signed transaction does not guarantee that its content is what we expect (see the cases of fake NFT transactions).
The process of signing a transaction is quite complex as it requires complex mathematical calculations. That is why we use specialized software to store our private keys and use them to sign transactions. This type of software is called Wallet. Anchor is one of the most used wallets in WAX after WAX Cloud Wallet (WCW). The main difference between WCW and Anchor lies in the custody of the keys. WCW retains custody of the private keys so we are not really the owners of the account. Anchor, on the other hand, allows us to have accounts whose key custody is entirely ours and, therefore, the ownership of the account.
Anchor is a wallet developed by Greymass that you can download from its official website at https://greymass.com/en/anchor
Problems with Anchor Wallet
As we have seen, the use of a Wallet like Anchor makes it much easier to use the blockchain. Thanks to Anchor we can identify ourselves in dApps, sign transactions and perform other operations. But sometimes we may encounter connection problems that prevent Anchor from completing transaction signing operations.
We can notice that something is not working properly if we see an icon like this one in the Anchor window itself.
Anchor tells us that it cannot connect to the blockchain and consequently will not be able to sign transactions.
Anchor does not connect directly to the blockchain. In fact, it connects to an API that will serve as a bridge between the application and the blockchain. What that icon tells us is that it cannot connect to the API perhaps because it is out of service.
Let’s see, first, a brief introduction to what an API is so that we can better understand the nature of this problem.
Brief introduction to APIs in WAX
An API (Application Programming Interfaces) is a set of services and protocols that act as an intermediary between two parties. It forms an abstraction layer that standardizes and facilitates communication between different software.
In our case, the API will be responsible for facilitating communication between Anchor and the blockchain. The blockchain validators themselves, or Block Producers, usually deploy different APIs as a public service for blockchain users. Keep in mind that WAX is a blockchain DPoS (Delegated Proof of Stake) and validators will be chosen according to their involvement and value contributed to the blockchain ecosystem. Offering access to different APIs is part of the services provided.
These APIs are hosted on powerful servers as they will receive huge amounts of requests from other dApps. In fact, the emergence of bots to operate unattended in Play to Earn games has become a real problem for these services as they can collapse the servers as if they were real attacks of denial of service (DDOS).
The operators of the nodes are obliged to keep them in perfect and continuous operation and to protect them from attacks and abuses. But this is not always possible, in addition to the fateful hardware failures that servers may suffer. Due to these failures it is possible for an API node to be temporarily out of service so that no dApp, or wallet, such as Anchor, will be able to operate with that node.
Solution
As we have mentioned, Block Producers offer these services publicly and free of charge, so it will not be difficult to find one that works so that we can tell Anchor to use it instead of the one that is not responding.
There are directories where you can find information on the services offered by WAX Block Producers. Here are some of them:
On the Ledgerwise website we will be able to see the list of Producers in two columns; one, green, indicating that all services are working correctly, and another, red, indicating that some of the services offered by the producer have some kind of problem.
In this screenshot I have highlighted our producer, or Guild, 3DK Render. As can be seen all its services are operational and among them appears a “History” or “Hyperion” service, which is one of the most used APIs to access the blockchain, as they keep a historical record of all transactions that have occurred, as well as allowing us to send new transaction requests that the API will be responsible for getting them to the blockchain.
We can use this tool to check the status of the API we have configured in our applications and, thus, rule out other possible problems.
On the EosNation website we can see, in the form of labels, a list of the same nodes and the services they offer in the form of icons whose presence indicates good operation, and its absence may indicate a problem or that the service is not available.
If we click on the card it will take us to a page with the detailed services where we can also find, if available, an API with “History” or “Hyperion” service.
We can also access through the menu “Reports, WAX, Endpoints” a list of all available services with the URL of each of them.
https://validate.eosnation.io/wax/reports/endpoints.html
This is similar to what we can find in Ledgerwise if we click on any of the buttons of the different services available from the header of the web:
It is important to note that these pages are updated in periods of no less than 30 minutes, so if a recent problem has occurred it may still not show it and, similarly, it may show a problem that has already been resolved. Nevertheless, it is a very helpful service.
Let’s see, then, where we can find the login API settings in Anchor wallet and how to replace it with another one.
First of all, we will click on the icon of the blockchain we have selected (no matter which one) and then on the drop-down menu where it says “Manage Blockchains”.
Now we will see a list with the blockchains we have configured. Don’t worry if you have more or less than in the screenshot. What is important is to locate the card for the main WAX blockchain (Mainnet) being careful not to confuse the card for the test blockchain (Testnet).
Click on the gear-shaped configuration button and you will see the following:
In point 3 you will see the URL of the node you have configured in your wallet. Let’s replace the URL with one of the services we saw available in the previous point, preferably a Hyperion node.
We have seen that the node https://apiwax.3dkrender.com is working fine so let’s enter that URL and then click on “Save”.
If the problem with Anchor not connecting correctly was due to the availability of the API, we will now see how the error icon disappears and our wallet returns to normal operation.
I hope this tutorial has been helpful. If you like our work you can support us with your vote to the producer “3dkrenderwax” or you can use our proxy for us to vote for you.
We remind you that you can find us in our Discord community to ask us any questions, to keep up to date with our updates or simply to participate in our activities and conversations.
https://discord.gg/3dkrender