Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/academy/[...slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ import posthog from 'posthog-js';

import ToolboxMdxWrapper from "@/components/toolbox/academy/wrapper/ToolboxMdxWrapper"
import CrossChainTransfer from "@/components/toolbox/console/primary-network/CrossChainTransfer"
import AvalancheGoDocker from '@/components/toolbox/console/layer-1/AvalancheGoDockerL1';
import AvalancheGoDocker from '@/components/toolbox/console/layer-1/L1NodeSetupDocker';
import CreateChain from "@/components/toolbox/console/layer-1/create/CreateChain"
import ConvertSubnetToL1 from "@/components/toolbox/console/layer-1/create/ConvertSubnetToL1"
import GenesisBuilder from '@/components/toolbox/console/layer-1/create/GenesisBuilder';
Expand Down
2 changes: 1 addition & 1 deletion app/console/layer-1/create/steps.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { type StepDefinition } from "@/components/console/step-flow";
import CreateChain from "@/components/toolbox/console/layer-1/create/CreateChain";
import AvalancheGoDockerL1 from "@/components/toolbox/console/layer-1/AvalancheGoDockerL1";
import AvalancheGoDockerL1 from "@/components/toolbox/console/layer-1/L1NodeSetupDocker";
import ConvertSubnetToL1 from "@/components/toolbox/console/layer-1/create/ConvertSubnetToL1";
import CreateManagedTestnetNode from "@/components/toolbox/console/testnet-infra/ManagedTestnetNodes/CreateManagedTestnetNode";

Expand Down
2 changes: 1 addition & 1 deletion app/console/layer-1/l1-node-setup/page.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use client";

import L1NodeSetup from "@/components/toolbox/console/layer-1/AvalancheGoDockerL1";
import L1NodeSetup from "@/components/toolbox/console/layer-1/L1NodeSetupDocker";

export default function Page() {
return (
Expand Down
26 changes: 22 additions & 4 deletions components/toolbox/components/ConfigureNodeType.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
"use client";

import { Checkbox } from "./Checkbox";

type NodeType = "validator" | "public-rpc";
import { NodeType } from "../console/layer-1/L1NodeSetupDocker";

interface ConfigureNodeTypeProps {
nodeType: NodeType;
Expand All @@ -25,12 +24,31 @@ export const ConfigureNodeType: React.FC<ConfigureNodeTypeProps> = ({
setPruningEnabled,
children
}) => {

return (
<>
<h3 className="text-xl font-bold mb-4">Configure Node Type</h3>
<p className="mb-4">What type of node do you want to run?</p>

<div className="space-y-4">

<label className="flex items-start space-x-3 cursor-pointer">
<input
type="radio"
name="nodeType"
value="validator-and-public-rpc"
checked={nodeType === "validator-and-public-rpc"}
onChange={() => setNodeType("validator-and-public-rpc")}
className="mt-1"
/>
<div>
<div className="font-medium">Combined Validator and Public RPC Node (not suitable for production)</div>
<div className="text-sm text-gray-600 dark:text-gray-400">
Participates in consensus. RPC endpoint is exposed externally. Not suitable for production settings. RPC and validator should be separated for security reasons.
</div>
</div>
</label>

<label className="flex items-start space-x-3 cursor-pointer">
<input
type="radio"
Expand Down Expand Up @@ -60,7 +78,7 @@ export const ConfigureNodeType: React.FC<ConfigureNodeTypeProps> = ({
<div>
<div className="font-medium">Public RPC Node</div>
<div className="text-sm text-gray-600 dark:text-gray-400">
Exposes RPC endpoint publicly via HTTPS. Suitable for production dApps and requires a server.
Exposes RPC endpoint publicly via HTTPS. Suitable for production dApps.
</div>
</div>
</label>
Expand Down Expand Up @@ -98,7 +116,7 @@ export const ConfigureNodeType: React.FC<ConfigureNodeTypeProps> = ({
)}

{/* Port configuration for public RPC node */}
{nodeType === 'public-rpc' && (
{nodeType === 'public-rpc' || nodeType === 'validator-and-public-rpc' && (
<div className="mt-6 p-4 bg-gray-50 dark:bg-gray-800 rounded-lg">
<h4 className="font-medium mb-2">Required Ports</h4>
<p className="text-sm text-gray-600 dark:text-gray-400">
Expand Down
395 changes: 0 additions & 395 deletions components/toolbox/console/layer-1/AvalancheGoDockerL1.tsx

This file was deleted.

401 changes: 401 additions & 0 deletions components/toolbox/console/layer-1/L1NodeSetupDocker.tsx

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ import { NodeBootstrapCheck } from "@/components/toolbox/components/NodeBootstra
import { ReverseProxySetup } from "@/components/toolbox/components/ReverseProxySetup";
import { ConfigureNodeType } from "@/components/toolbox/components/ConfigureNodeType";
import { C_CHAIN_ID, generateDockerCommand } from "@/components/toolbox/console/layer-1/create/config";
import { NodeType } from "../layer-1/L1NodeSetupDocker";

export default function AvalancheGoDockerPrimaryNetwork() {
const [nodeType, setNodeType] = useState<"validator" | "public-rpc">("validator");
const [nodeType, setNodeType] = useState<NodeType>("validator");
const [rpcCommand, setRpcCommand] = useState("");
const [domain, setDomain] = useState("");
const [enableDebugTrace, setEnableDebugTrace] = useState<boolean>(false);
Expand All @@ -22,7 +23,7 @@ export default function AvalancheGoDockerPrimaryNetwork() {

const { avalancheNetworkID } = useWalletStore();

const isRPC = nodeType === "public-rpc";
const isRPC = nodeType === "public-rpc" || nodeType === "validator-and-public-rpc";

useEffect(() => {
try {
Expand Down Expand Up @@ -116,7 +117,7 @@ export default function AvalancheGoDockerPrimaryNetwork() {
</Step>

{/* Conditional steps based on node type */}
{nodeType === "public-rpc" && (
{isRPC && (
<Step>
<ReverseProxySetup
domain={domain}
Expand All @@ -129,7 +130,7 @@ export default function AvalancheGoDockerPrimaryNetwork() {



{nodeType === "validator" && (
{nodeType !== "public-rpc" && (
<Step>
<h3 className="text-xl font-bold">Wait for the Node to Bootstrap</h3>
<p>Your node will now bootstrap and sync the Primary Network (P-Chain, X-Chain, and C-Chain). This process can take <strong>several hours to days</strong> depending on your hardware and network connection.</p>
Expand Down Expand Up @@ -169,7 +170,7 @@ export default function AvalancheGoDockerPrimaryNetwork() {
)}

{/* Show success message when node is ready for validator mode */}
{nodeIsReady && nodeType === "validator" && (
{nodeIsReady && nodeType !== "public-rpc" && (
<Step>
<h3 className="text-xl font-bold mb-4">Node Setup Complete</h3>
<p>Your AvalancheGo Primary Network node is now fully bootstrapped and ready to be used as a validator node.</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ authors: [owenwahlgren]
icon: Terminal
---

import AvalancheGoDocker from "@/components/toolbox/console/layer-1/AvalancheGoDockerL1";
import ManagedTestnetNodes from "@/components/toolbox/console/testnet-infra/ManagedTestnetNodes";
import AvalancheGoDockerL1 from "@/components/toolbox/console/layer-1/L1NodeSetupDocker";
import ToolboxMdxWrapper from "@/components/toolbox/academy/wrapper/ToolboxMdxWrapper.tsx";

Now that the P-Chain records are set up, you can start syncing the node with your Subnet.
Expand Down Expand Up @@ -35,6 +36,6 @@ intended for running on production environments. They are shut down automaticall
using Docker:

<ToolboxMdxWrapper walletMode="testnet-mainnet">
<AvalancheGoDocker />
<AvalancheGoDockerL1 />
</ToolboxMdxWrapper>

Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ icon: Terminal
import { Step, Steps } from 'fumadocs-ui/components/steps';
import { Button } from '@/components/ui/button';
import ToolboxMdxWrapper from "@/components/toolbox/academy/wrapper/ToolboxMdxWrapper.tsx";
import AvalancheGoDocker from "@/components/toolbox/console/layer-1/AvalancheGoDockerL1";
import ManagedTestnetNodes from "@/components/toolbox/console/testnet-infra/ManagedTestnetNodes";
import AvalancheGoDockerL1 from "@/components/toolbox/console/layer-1/L1NodeSetupDocker";
import CreateChain from "@/components/toolbox/console/layer-1/create/CreateChain";

In the [Avalanche Fundamentals course](/academy/avalanche-fundamentals), you learned how to quickly set up an L1 using the [Developer Console](https://build.avax.network/tools/l1-toolbox). This section provides an in depth review of that flow, understanding what comes pre-configured in our genesis, and laying the foundation for what we will need for our Permissioned L1.
Expand Down Expand Up @@ -90,7 +91,7 @@ For production environments or extended testing periods, you should use Docker t
**Docker Setup Guide:**

<ToolboxMdxWrapper walletMode="testnet-mainnet">
<AvalancheGoDocker />
<AvalancheGoDockerL1 />
</ToolboxMdxWrapper>

</Step>
Expand Down