Setting up GenesysGo as RPC Host on Candy Machine V2 - solana

I am finalizing my first Candy Machine minting project using Candy Machine V2. I have read that its not a good idea to use the default https://api.mainnet-beta.solana.com host because it can't handle large amounts of traffic. I've update the Candy Machine .env file to use the GeneysisGo endpoint (https://shdw.genesysgo.com/genesysgo/the-genesysgo-rpc-network), my .env file looks like this:
REACT_APP_CANDY_MACHINE_ID=<my ID>
REACT_APP_SOLANA_NETWORK=mainnet-beta
REACT_APP_SOLANA_RPC_HOST=https://ssc-dao.genesysgo.net/
SKIP_PREFLIGHT_CHECK=true
I was reading this article: https://medium.com/#elysianft/lets-put-an-end-to-bad-drops-on-solana-c8cfd6d33e69. It mentions to find the web3.clusterApiUrl(env) and change it with the updated RPC URL from GeneysisGo but I don't see that line in the asssets.ts file as the article mentions. I only see those lines in the following two files:
App.tsx: (looks like this file already takes the rpcHost if there is one).
const connection = new anchor.web3.Connection(
rpcHost ? rpcHost : anchor.web3.clusterApiUrl('devnet'),
);
cli-nft.ts:
Original:
const connection = new web3.Connection(web3.clusterApiUrl(env));
After my update:
const connection = new web3.Connection(rpcUrl || web3.clusterApiUrl(env));
My question is should I actually update this files or is the article out of date?
Any help is appreciated.

You dont have to change any code atm, that guide is really outdated!.
In order to use a custom RPC you just have to change the .env file and nothing else. Just make sure to use the latest version of candy-machine-ui. Your env file is completly correct btw.

Related

No active configuration. Make sure GIDClientID is set in Info.plist

I am very new to app development. I was trying to configure my GoogleSignInButton Callback function.
I get the error:
No active configuration. Make sure GIDClientID is set in Info.plist.
However, my Info.plist defines GIDClientID along with the value generated as advised here
OS: Version 13.0 Beta
Xcode: Version 14.1 beta 3
In order to resolve this issues, you don't need to add anything into the info.plist. you need to setup GIDSignIn.sharedInstance.configuration = config
https://github.com/WesCSK/SwiftUI-Firebase-Authenticate-Using-Google-Sign-In/blob/starting/README.md#updated-steps-for-v700-of-google-signin
guard let clientID = FirebaseApp.app()?.options.clientID else { return }
// Create Google Sign In configuration object.
let config = GIDConfiguration(clientID: clientID)
GIDSignIn.sharedInstance.configuration = config
....
Google documentation at Firebase Login methods is worse than....
So, if you are using 8.6.0 you can use GIDSignIn.sharedInstance.signIn(withPresenting: presentingVC), but add ClientID in Info.plist like here:
enter image description here
Regarding the main issue, from your picture I see that you put the URLSchema at GIDClientID, they are a little bit different.
Eg. GIDclientID: xxxx-xxxxxx.apps.googleusercontent.com
URLSchema: com.googleusercontent.apps.xxxx-xxxxxx.
Try like that.
I get my clientId using this line of debug in my code
guard let clientID = FirebaseApp.app()?.options.clientID
Same error. I'm newbie too, it helped for me to reinstall packages (GoogleSignIn and FirebaseAuth) with older versions (6.0.0 and 8.6.0) so GIDSignIn.sharedInstance.signIn(with: config, presenting: self) is available. This is a temporary solution till we find working way.
Don't add new property named "GIDClientID" into the Info.plist of target project, use CLIENT_ID which is defined in GoogleService-Info.plist instead.
Find more details here:
https://stackoverflow.com/a/74897652/19683708
This changes in google sign is new. Also GIDSignIn.sharedInstance.signIn(with: config, presenting: self) is not available anymore. GIDSignIn.sharedInstance.signIn(withPresenting: presentingVC) replaced it. But I got same error. Hope to someone find an answer

Connecting to signalling server with xirsys and simplewebsocket

I am trying to implement a WebRTC application using the xirsys API and simpleWebRTC. I am trying to connect using the secure method. So inside the connect.js file, I have this:
var xirsysConnect = {
secureTokenRetrieval : true,
server : '../getToken.php/',
data : {
domain : 'MY_DOMAIN_HERE',
application : 'default',
room : 'default',
secure : 1
}
};
When I open the page in a browser, I get this error in the console:
Failed to construct 'WebSocket': The URL 'undefined/v2/LONG_STRING_HERE' is invalid
I can't seem to find any help in the docs. I have also tried looking in the source code, but can't seem to make any headway. Any help will be greatly appreciated.
For having spent the last couple of days trying to make this work, I concluded that the Xirsys demo using simpleWebRTC isn't ready for prime time. Comments in the source code often don't reflect what's in the code itself. Additionally, there is, indeed, no proper online documentation about it.
I had hoped for Xirsys to provide something more professional. I'm looking forward to clarifications and improvements on their side.

Parse.Config does not work on Parse Server?

I can't seem to find anything official about this: Does Parse.Config work on Parse Server? It used to work on Parse.com but when I try to migrate to Parse.Server, when trying the REST API it seem to fail:
GET http://localhost:1337/parse/config
Passing in my app ID. I read somewhere Config does not work on Parse Server, but wanted to confirm
Although is not officially supported as mentioned on the docs,there is a way to make it work. It is still an experimental implementation though.
As mentioned here & here, you should set the environment variable:
PARSE_EXPERIMENTAL_CONFIG_ENABLED=1
Then restart your node server. In case you deployed it on heroku for example you should on cli heroku restart -a <APP_NAME>
If that doesn't work I would suggest to simply add your route with your configuration options on your project's index.js file where express is initialized like so.
var parseConfig = {
"params": { /*...put your options here*/ }
};
// :one? is for old SDK compatibility while is optional parameter.
app.all('/parse/:one?/config', function (req, res) {
res.json(parseConfig);
});

Issues with Skybound.Gecko.GeckoPreferences.User

I have the following code:
Skybound.Gecko.GeckoPreferences.User("network.proxy.type") = 1
Skybound.Gecko.GeckoPreferences.User("network.proxy.share_proxy_settings") = True
Skybound.Gecko.GeckoPreferences.User("network.proxy.https") = "000.000.000.000"
Skybound.Gecko.GeckoPreferences.User("network.proxy.https_port") = 80
Skybound.Gecko.GeckoPreferences.User("network.proxy.https_remote_dns") = True
In which 000.000.000.000 is a proxy.
The problem is sometimes it works and most of the time is not affected.
How can I see if the proxy IP is affected to the network.proxy.https? Also, how can I force the change of the proxy and the port?
One other problem:
Sometimes where I am using geckowebbrowser it sends a message box with choice answer, like:
Would you really like to quit this page?
How can I escape this message box and others?
I'm fairly new to GeckoFX, but I know that in the latest version (31.0), Skybound doesn't exist anymore. You may have some luck by upgrading to the latest version. Here is the link to the repo: https://bitbucket.org/geckofx

Timeout Problem with Ruby Fog when bootstrapping AWS servers

I've been trying for a little while now to provision a small instance on AWS with the fog library. I've been somewhat successful (in that an instance does spool up when I run this code), but I keep getting timeout errors during the SSH portion, and when I dug deeper I found that they're consistently "AuthentitcationFailed" problems.
The failing code is as follows:
require 'rubygems'
require "fog"
connection = Fog::Compute.new({
provider: "AWS",
aws_secret_access_key: SECRET_KEY,
aws_access_key_id: ACCESS_KEY
})
server = connection.servers.bootstrap({
private_key_path: "~/.ssh/id_rsa",
public_key_path: "~/.ssh/id_rsa.pub",
username: "ubuntu"
})
Much reading has told me that sometimes this is just because the instance takes too long to spool up, but this is very consistent (it happens every time I try it). Does anyone see what I'm doing wrong?
I had the same problem some days ago and actually found the problem for my case and submitted it to the Fog issue tracker.
A colleague of mine was using connection.bootstrap() with the same AWS credentials but different SSH keys. So the "fog_default" public key had already been registered and the attempt to log in with my key pair failed.
If you're experiencing similar problems, check with connection.key_pairs.get('fog_default') if fog_default was registered before.
If this is actually the case, you have three options to get around this problem:
Delete the fog_default by running: connection.key_pairs.get('fog_default').destroy and register your new public key via bootstrap()
Manually register your custom key under a custom name
Set Fog.credential to a custom name so bootstrap() uses this name instead of "default" to register your public key
Solution two looks like this:
Fog.credentials = Fog.credentials.merge({
:private_key_path => "./keys/my_custom_key",
:public_key_path => "./keys/my_custom_key.pub"
})
if connection.key_pairs.get('my_custom_key').nil?
public_key = IO.read('./keys/my_custom_key.pub')
connection.import_key_pair('my_custom_key', public_key)
end
server = connection.servers.bootstrap(
:key_name => 'my_custom_key',
...
)
Solution three, which I prefer because the only change I need to make is to set Fog.credential, looks like this:
Fog.credential = :my_custom_key
connection.servers.bootstrap(
:private_key_path => './keys/my_custom_key',
:public_key_path => './keys/my_custom_key.pub',
...
)
I'd recommend a few things to diagnose the problem (if you're still having it)
Check your security groups to make sure port 22 is open to your IP / the world (0.0.0.0/0)
Try connecting manually using SSH
If you still see issues, try
ssh -v -v <normal options>
This will give you more information on what is happening when trying to connect to the instance.

Resources