How to contribute to Mordor testnet — Ethereum Classic

Stevan Lohja
etc_core
Published in
3 min readMar 30, 2020

--

Ref: https://core-geth.org/contribute-to-mordor-testnet/

Mordor is a PoW Ethereum Classic testnet. A testnet allows developers to perform specific tests. Developers may want to test protocol changes, test a smart contract, or interact with the network in anyway that does not require real EthClassic (ETC)—just don’t test on mainnet, mainnet is for production.

Summary:

Install Core-geth

https://core-geth.org/

You can visit the Core-geth documentation for more installation options. I’m using Ubuntu 19.1.0.

If you just want to download and run geth or any of the other tools here, this is the quickest and simplest way. Binary archives are published at https://github.com/etclabscore/core-geth/releases.

wget https://github.com/etclabscore/core-geth/releases/download/v1.11.1/core-geth-linux.zip # download binary releasesudo unzip core-geth-linux.zip -d /bin/ # unzip and select destinationgeth --help # check install, view usage & commands

Running geth --help will show a plentiful amount of usage and commands. Under ETHEREUM OPTIONS: you’ll see all the Ethereum Classic, Ethereum, and related testnet flags. We need to use the --mordor flag when we rungeth.

Create an account on Mordor

Mordor is a PoW testnet, so we can make an account to mine and receive testnet-ETC. Creating a new account in geth will create a public/private key pair and you’ll be prompted to create a password for that account.

geth --mordor account new

List the account(s)

geth --mordor account list

You’ll notice listing the account will print the keystore file location.For example:keystore:///home/USER/.ethereum/mordor/keystore/UTC...

Run Mordor with Mining Enable

Run mordor testnet with mining and rpc enabled. We want to enable mining to mine testnet ETC and enable RPC to access our node.

geth --mordor --rpc --rpcaddr "localhost" --rpcport 8545 --mine --minerthreads 1

Check Mordor Balance on Expedition.dev

So, you’re running a Mordor node and mining testnet ETC. Woohoo! An easy way to double check you’re actually growing a Mordor testnet balance is on Expedition.dev https://expedition.dev/?network=mordor. Just search the account address you created earlier.

Add your Mordor Account to a Wallet?

You can use your keystore file to import your wallet into a wallet application such as MetaMask. In MetaMask

  • Select localhost:8545 under network selection. This will connect the wallet to your local Mordor node.
  • Under your account profile select import account > select type (JSON) > upload your keystore file. You may need to enter the account password.

Tip (optional)

One way to avoid typing or copy and pasting this

geth --mordor --rpc --rpcaddr "localhost" --rpcport 8545 --mine --minerthreads 1

is creating a shell script file. touch start-mordor.sh to create the file && echo “the contents” into the shell script file && add chmod executable+x permissions to the file.

touch start-mordor.sh && echo "geth --mordor --rpc --rpcaddr "localhost" --rpcport 8545 --mine --minerthreads 1" >start-mordor.sh && chmod +x start-mordor.sh

Run it ./start-mordor.sh

More Mordor Resources

About ETC Core

ETC Core is a leading Ethereum Classic core development team. We deliver infrastructure tooling, specifications, and resources to the Ethereum Classic ecosystem. We strongly believe in high-quality software, readability, and cross-chain compatibility. We maintain the Core-Geth client and actively participate in protocol research, upgrades, and events. We maintain the EVM-LLVM backend project and committed to maximizing EVM capabilities and innovating smart contract development. Check out our projects: https://etccore.io/projects

Follow ETC Core

--

--