DEVELOPER DOCS
Network merge guide

Node merge

On March 28th, 2024 Irys merged our mainnet nodes.

This simplifies our developer experience and means you no longer need to:

  • Choose a node when uploading to our mainnet
  • Manage balances on separate mainnet nodes
ℹ️

This change is fully backward compatible.

You can continue using the existing URLs and SDKs with no code changes.

Balances on nodes 1 & 2 will merge into a single mainnet balance. Your funds are safu.

For more information, see below.

Free uploads

Uploads of less than 100 KiB remain free on Irys' mainnet and devnet.

Balances

User balances on nodes 1 and 2 have been merged into a single mainnet balance.

Node URLs

Most users will not need the direct node URLs as the SDK abstracts this away. However, if needed, you can use the following:

  • https://arweave.mainnet.irys.xyz
  • https://arweave.devnet.irys.xyz

Upgrading

To upgrade your code, see below:

SDK

Previously, you specified a node URL when connecting to our SDK.

const irys = new Irys({
	url: "https://node2.irys.xyz", // URL of the node you want to connect to
	token, // Token used for payment
	key: process.env.PRIVATE_KEY, // Private key
});

Now, you pass either "mainnet" or "devnet" as the value of the network parameter.

const irys = new Irys({
	network: "mainnet", // "mainnet" or "devnet"
	token, // Token used for payment
	key: process.env.PRIVATE_KEY, // Private key
});

CLI

Previously, you specified a node URL using the -h flag.

irys fund 1000000000000000 \
  -h https://node1.irys.xyz \
  -t ethereum \
  -w bf20......c9885307

Now, you specify either mainnet or devnet using the -n flag.

irys fund 1000000000000000 \
  -n mainnet \
  -t ethereum \
  -w bf20......c9885307

If you omit the -n flag, the CLI will default to mainnet.

irys fund 1000000000000000 \
  -t ethereum \
  -w bf20......c9885307

Query package

Previously, you set the query location using the url parameter.

const myQuery = new Query({ url: "https://devnet.irys.xyz/graphql" });

Now, you set the query location using the network parameter.

const myQuery = new Query({ network: "mainnet" }); // "mainnet" || "devnet" || "arweave"

If needed, you can continue using the url parameter to override the default GraphQL endpoint.

const myQuery = new Query({ url: "https://arweave-search.goldsky.com/graphql" });

Previously, when querying directly from the SDK, you used the url() method to specify a search location. This method has been deprecated.

const result = await irys
	.search("irys:transactions")
	.url("https://node1.irys.xyz/graphql")
	.token("ethereum")
	.fromTimestamp(new Date("2023-07-01"))
	.toTimestamp(new Date("2023-07-03"));

And the network() method has been added.

const result = await irys
	.search("irys:transactions")
	.network("mainnet") // "mainnet" || "devnet"
	.token("ethereum")
	.fromTimestamp(new Date("2023-07-01"))
	.toTimestamp(new Date("2023-07-03"));

GraphQL

Previously, we had separate URLs for our two mainnet nodes.

NodeEndpoint
Node 1https://node1.irys.xyz/graphql (opens in a new tab)
Node 2https://node2.irys.xyz/graphql (opens in a new tab)
Devnethttps://devnet.irys.xyz/graphql (opens in a new tab)

Now, we use a unified URL.

NodeEndpoint
Mainnethttps://arweave.mainnet.irys.xyz/graphql (opens in a new tab)
Devnethttps://arweave.devnet.irys.xyz/graphql (opens in a new tab)

Provenance Toolkit

The Provenance Toolkit has been updated to use our unified nodes.

Whistleblower

Previously, you used a flag to tell Whistleblower which mainnet nodes to monitor.

yarn whistleblower init --nodes https://node1.irys.xyz https://node2.irys.xyz
yarn start
npm run whistleblower init  -- --nodes https://node1.irys.xyz https://node2.irys.xyz
npm run start

Now, you no longer need to.

yarn whistleblower init
yarn start
npm run whistleblower init
npm run start