dashed-slug.net › Forums › TurtleCoin Adapter extension support › I’m getting ready to replace my hacked up monero adapter with yours
Tagged: coin adapters, installation
- This topic has 38 replies, 2 voices, and was last updated 4 years, 5 months ago by alexg.
-
AuthorPosts
-
July 20, 2020 at 7:24 pm #8888d3vnu77Participant
If I try to start the RPC client without a wallet (as specified in the installation instructions):
./2acoin-service –rpc-password MySuperSecretPassw0rd –bind-address 10.136.18.61 –enable-cors “*”
Fatal error: You must specify a wallet file to open!July 20, 2020 at 7:28 pm #8890alexgKeymasterOK, first of all there is the TurtleCoind service that syncs the blockchain.
Then, you also need a program that connects to this blockchain service to present addresses/wallets to your business logic.
If I have understood correctly, in the past the
turtle-service
was used for this. Nowadays there is the newer wallet-api service.You will NOT be able to use
2acoin-service
, because the TurtleCoin adapter is not built to communicate withturtle-service
.I have built the TurtleCoin adapter to communicate with the
wallet-api
service.If your coin is a fork from an earlier TurtleCoin repo, then it may not have
wallet-api
.HOWEVER, it’s very likely that you may be able to use the
wallet-api
service to connect to your 2acoind. Only the 2acoin developer or the TurtleCoin developer would know for sure, since I’ve never tried this.July 20, 2020 at 7:29 pm #8891d3vnu77ParticipantWith 2acoin-service I usually start it using:
./2acoin-service -w thesitewallet.wallet -p MySuperSecretPassw0rd --rpc-password MySuperSecretPassw0rd
July 20, 2020 at 7:34 pm #8892alexgKeymasterTo further clarify, please see https://docs.turtlecoin.lol/developer/resources under “TurtleCoin Core RPC APIs”
the
turtle-service
API is deprecated.July 20, 2020 at 7:42 pm #8893d3vnu77ParticipantI just talked to the developer. It looks like we can use wallet-api as well
July 20, 2020 at 9:08 pm #8894d3vnu77ParticipantOk, so blockchain is downloaded, daemon is running, wallet-api is running, when I save the RPC Password/Wallet Password. The API chirps about “Client requested to modify a wallet, whilst no wallet is open” as can be seen in the screen shot…
Also it looks like I’m getting the same error: Not responding: Cannot open wallet n2aa.org.wallet until the admin provides the passphrase
I’ve taken screenshots of everything that might be relevant.
On a side note, the tip on how to start the daemon and wallet-api seems to have switched the port numbers up so in the tip it is saying to use the daemon port on wallet-api and vice-versa.
Attachments:
You must be logged in to view attached files.July 21, 2020 at 2:13 am #8900d3vnu77ParticipantYea, I save the wallet encryption password and it is not saving it into the database when I do a DB wide search…
I just moved this whole server from an apache2 server to an nginx server, but everything else seems to be working fine…
Any idea why the password is not in the database, what is the option name I am looking for?
July 21, 2020 at 2:18 am #8901d3vnu77ParticipantI see the issue, now I dont think I have mbstring installed on this server
July 21, 2020 at 2:34 am #8902d3vnu77ParticipantMaybe it is a residual from before, since I was already using this currency… so it is not generating anymore options for it and Im stuck with the options I currently have from before.
As you can see from the screenshot I am missing the deamon IP Address and Port & the Wall password options in the database here…
Any reason why these options don’t exist in my database?
Attachments:
You must be logged in to view attached files.July 21, 2020 at 8:04 am #8905alexgKeymasterHello,
OK it’s great news to hear that you can use wallet-api with your blockchain! You brought up several points, let me address all of them:
mbstring
is not a required PHP module, so it is not an issue if you don’t have it.The wallet password is saved in a transient, so it’s not necessarily in the DB. Assuming your coin’s symbol is
ARMS
, the transient name istrtl-ARMS-settings-wallet-passphrase
. You can check what the value is using wp-cli:wp transient get trtl-ARMS-settings-wallet-passphrase
Where transients are stored depends on whether you have a server-side object cache installed. Some object caches store transients on their own memory rather than the DB, so this is why you should use
wp-cli
to check transients, not MySQL/phpMyAdmin.To see exactly how the password is saved, see the function
update_value_if_not_empty()
. It’s hooked on the savepre_update_option_
filter for optiontrtl-ARMS-settings-wallet-passphrase
. The function gets a value and if it’s not empty, it tries to save it in a transient. If the value of theoption wallets_secrets_retain_minutes
is 0 or empty, then the transient is saved forever. Otherwise it’s saved for however many minutes you’ve set secrets to be saved for.I’m not sure why your daemon IP and port are not saved in your DB. They should be in
trtl-ARMS-settings-daemon-ip
andtrtl-ARMS-settings-daemon-port
respectively.I also noticed that, according to your settings as shown in the screenshot, your coin symbol is “2acoin” not “ARMS”. How are you defining your coin? I have included 2acoin/ARMS as a default coin, so you shouldn’t have to use
wallets_turtlecoin_adapter_filter
at all. If you are using this filter, delete it. Your coin’s name is 2ACoin and its symbol is “ARMS”: https://www.coingecko.com/en/coins/2acoinHope this helps. Good luck. Please let me know what you found. I think you are looking at the wrong options in your DB (
wallets-2acoin-*
rather thanwallets-ARMS-*
).with regards
July 21, 2020 at 3:26 pm #8907d3vnu77ParticipantYea, so the wallet password and the rpc password does not seem to be saving into the database…
You can see in this alphanumerically arranged list that they are not in there…
Also, when I run “wp transient get trtl-ARMS-settings-wallet-passphrase” after saving settings I get:
Warning: Transient with key “trtl-ARMS-settings-wallet-passphrase” is not set.
wallets_secrets_retain_minutes is set to 0 as can be seen in the screenshot
The original 2acoin adapter has been disabled and deleted.
The passwords when saved still are not saved to the database.
Attachments:
You must be logged in to view attached files.July 21, 2020 at 3:40 pm #8911d3vnu77ParticipantI manually added the options to the database, but the same connection errors still occur with the manually added options as seen in the screenshot.
Attachments:
You must be logged in to view attached files.July 21, 2020 at 4:11 pm #8913alexgKeymasterWhile most options are saved as options, the secrets are stored as transients. If your object cache were misbehaving, you would get this issue.
What is the output of the command
wp cache type
? This is a wp-cli command that will determine the type of object cache installed.July 21, 2020 at 4:16 pm #8914alexgKeymasterAlso check to see if the
wp-content/cache
directory is writable by your HTTP server’s user:group (usuallywww-data:www-data
).For more information about the default object cache, see this article: https://perishablepress.com/how-to-enable-the-default-wordpress-object-cache/
July 21, 2020 at 4:52 pm #8915d3vnu77ParticipantCache: W3TC memcached
wp-content/cache is writable
-
AuthorPosts
- You must be logged in to reply to this topic.