Skip to main content
ESCEID

Sidechain Framework

Elastos sidechains share a common Go framework that provides cross-chain verification, merged mining linkage, and transaction types. On top of this base, two production sidechains run as Geth forks with custom precompiled contracts.

Base Sidechain Transaction Types

CodeNamePurpose
0x00CoinBaseBlock reward
0x01RegisterAssetAsset registration (ELA token)
0x02TransferAssetStandard ELA transfer
0x05SideChainPowLinks sidechain block to main chain mining
0x06RechargeToSideChainDeposit: main chain ELA to sidechain
0x07WithdrawFromSideChainWithdraw: sidechain ELA to main chain
0x08TransferCrossChainAssetCross-chain transfer payload

Cross-Chain Safety Valve

Cross-chain transfers are automatically rejected when the main chain's consensus is in PoW-only mode. This prevents exploits during consensus transitions.

ESC: Elastos Smart Chain

PropertyValue
Chain ID20
Basego-ethereum (Geth) fork
ConsensusPBFT with BPoS validators
Signing curvesecp256k1 (standard Ethereum)
P2P port20638
JSON-RPC port20636
WebSocket port20632

10 Custom Precompiled Contracts

ESC extends the standard EVM with custom precompiles at addresses 1000–1009:

AddressNamePurpose
1000GetProducersBPoS producer info at a given block height
1001GetArbitersCurrent arbiter set at a given block height
1002pbkVerifySignaturesecp256k1 signature verification
1003pledgeBillVerifyPledge bill multi-sig verification
1004GetStakeInfoBPoS staking info for an address
1005GetCandidateVotesCandidate vote tallies at a given height
1006GetAllStakeInfoNetwork-wide staking data
1007GetHashByHeightBlock hash at a given height
1008P256VerifyNIST P-256 (secp256r1) signature verification
1009GetHeaderInfoBlock header data at a given height

P256Verify (1008) is particularly important — it bridges the main chain's P-256 curve into the secp256k1 EVM environment, enabling contracts to verify arbiter signatures.

Cross-Chain Processing

Deposits: When the arbiter calls sendrechargetransaction, the ESC node fetches the tx and Merkle proof from the main chain, verifies via its SPV light client, deduplicates, and mints ELA.

Withdrawals: User sends ELA to the cross-chain contract. The contract burns it and emits a PayloadReceived event. The arbiter detects this via getwithdrawtransactionsbyheight and creates a withdrawal on the main chain.

EID: Elastos Identity Chain

PropertyValue
Chain ID22
Basego-ethereum (Geth) fork
ConsensusPBFT with BPoS validators
P2P port20648
JSON-RPC port20646
WebSocket port20642

3 DID Precompiled Contracts

AddressNamePurpose
22 (0x16)operationDIDCreate, update, or deactivate DID documents
23 (0x17)resolveDIDResolve a DID string to its current document
2007 (0x7D7)kycCustom DID identity operations

DID documents are stored as transaction payloads. The precompiled contracts index these by DID and replay operations chronologically during resolution.

PBFT Consensus

Both ESC and EID use PBFT (Practical Byzantine Fault Tolerance) with the 12 Council members as consensus validators.

PropertyValue
FinalityInstant — no block reorganizations
BFT threshold2/3 supermajority
Fault toleranceUp to 1/3 malicious validators
Safety valveCross-chain blocked if main chain falls to PoW
Arbiter syncValidator set synced from main chain via SPV