You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 28, 2021. It is now read-only.
Aleth contains a DAO hard fork challenge which it issues to potential peers in order to avoid wasting time syncing to ETC nodes. Additional details on the motivation for this challenge are described here: #5540 (comment)
The way the challenge works is that Aleth requests the DAO hard fork block from a potential peer and validates the extradata section of the block. If the peer is an ETC node, the hard fork block won't contain the expected extradata data and Aleth will avoid peering with the node.
if (m_daoChallengedPeers.find(_peerID) != m_daoChallengedPeers.end())
{
if (verifyDaoChallengeResponse(_r))
syncPeer(_peerID, false);
else
m_host.disablePeer(_peerID, "Peer from another fork.");
m_daoChallengedPeers.erase(_peerID);
return;
}
However, this challenge prevents us from syncing blocks with ETC nodes from before the DAO hard fork block. An optimization would be to only perform the DAO hard fork challenge if our top block is >= the DAO hard fork block (1920000).
Aleth contains a DAO hard fork challenge which it issues to potential peers in order to avoid wasting time syncing to ETC nodes. Additional details on the motivation for this challenge are described here: #5540 (comment)
The way the challenge works is that Aleth requests the DAO hard fork block from a potential peer and validates the extradata section of the block. If the peer is an ETC node, the hard fork block won't contain the expected extradata data and Aleth will avoid peering with the node.
The block is requested here:
aleth/libethereum/BlockChainSync.cpp
Lines 204 to 209 in 6de1e88
The challenge is verified in
BlockChainSync::onPeerBlockHeaders:aleth/libethereum/BlockChainSync.cpp
Lines 444 to 453 in 6de1e88
However, this challenge prevents us from syncing blocks with ETC nodes from before the DAO hard fork block. An optimization would be to only perform the DAO hard fork challenge if our top block is >= the DAO hard fork block (1920000).