Skip to content

Commit

Permalink
testnet updates (#356)
Browse files Browse the repository at this point in the history
* testnet updates

* testnet updates

* tests

* print table function and new error message

* removed printTable

Co-authored-by: todesstille <[email protected]>
  • Loading branch information
error2215 and todesstille authored Nov 6, 2021
1 parent 59365f3 commit 0b4b941
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion core/forkid/forkid_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func TestCreation(t *testing.T) {
params.DevinChainConfig,
params.DevinGenesisHash,
[]testcase{
{10, ID{Hash: checksumToBytes(0xf0dfdbec), Next: 0}},
{10, ID{Hash: checksumToBytes(0x5a2baa1c), Next: 0}},
},
},
// Koliba test cases
Expand Down
2 changes: 1 addition & 1 deletion core/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ func DefaultDevinGenesisBlock() *Genesis {
return &Genesis{
Coinbase: DefaultCoinbaseDevin,
Config: params.DevinChainConfig,
Timestamp: 1635763490,
Timestamp: 1635955256,
Nonce: 0x000000000002,
EnergyLimit: 12500000,
}
Expand Down
2 changes: 2 additions & 0 deletions p2p/peer_error.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ const (
DiscProtocolError
DiscUselessPeer
DiscTooManyPeers
DiscTooManyInboundPeers
DiscAlreadyConnected
DiscIncompatibleVersion
DiscInvalidIdentity
Expand All @@ -78,6 +79,7 @@ var discReasonToString = [...]string{
DiscProtocolError: "breach of protocol",
DiscUselessPeer: "useless peer",
DiscTooManyPeers: "too many peers",
DiscTooManyInboundPeers: "too many inbound peers",
DiscAlreadyConnected: "already connected",
DiscIncompatibleVersion: "incompatible p2p protocol version",
DiscInvalidIdentity: "invalid node identity",
Expand Down
2 changes: 1 addition & 1 deletion p2p/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -808,7 +808,7 @@ func (srv *Server) postHandshakeChecks(peers map[enode.ID]*Peer, inboundCount in
case !c.is(trustedConn) && len(peers) >= srv.MaxPeers:
return DiscTooManyPeers
case !c.is(trustedConn) && c.is(inboundConn) && inboundCount >= srv.maxInboundConns():
return DiscTooManyPeers
return DiscTooManyInboundPeers
case peers[c.node.ID()] != nil:
return DiscAlreadyConnected
case c.node.ID() == srv.localnode.ID():
Expand Down
6 changes: 3 additions & 3 deletions params/bootnodes.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ var MainnetBootnodes = []string{
// Devin test network.
var DevinBootnodes = []string{
"enode://caeef3fe131f1ed322735e4195ed8a887c3a5316dbd13595e09d98f02ef816c375a8be2baf9dbfac571d6d497c0d1afeb5b014d8df04cc5c00@168.119.231.210:30300", // core-devin-node-9 core-devin-eu-ge-by
"enode://d67d5db87c8e6bc8139df78c45819675bbd992eded7bbc5c18b1868c53beb7a0b5242e95d7e9ddfdd0ad5f833531302616059fd4f60ce24a80@78.47.203.14:30300", // core-devin-node-10 core-devin-eu-ge-sn
"enode://4a19d5ac99da155f54cc5d56751f069a8a7e475c8d0a5fafdcabeb409a9fb71f33008592571cfdc949d8db8733a6ba7ecf8b759c42799baa80@51.15.51.158:30300", // core-devin-node-18 core-devin-eu-nl-ams
"enode://6819914de7cc04e0cd8521974e0c0910acf89d862bce0b284afda70d0fe8e7b5115e058d33b54cc6eb73e9f8ccdc3a6400fb1499109769d680@51.158.123.140:30300", // core-devin-node-20 core-devin-eu-fr-idf
"enode://f9cf86278b202b396f07eb3206092674635a387a7b5e03e2ed8073267fd9dfb70082d7d14d9ea4dddd2891363a1c32303de55b3fbdedae9a80@78.47.203.14:30300", // core-devin-node-10 core-devin-eu-ge-sn
"enode://1b5b5a269e98cca3353077e393d46370a2daa21b3da5d3fe2e1edbd42d400021660990a690bed90c0b5777899b51183f5aa5737cc5b5a64800@51.15.51.158:30300", // core-devin-node-18 core-devin-eu-nl-ams
"enode://ad8212b20b930a6f8609ccff235e4bcce9189711132f9b76609d51b12fe2900601fc2f81f87991ec0c74d1114fb6b88f019bdb48b8b490e380@51.158.123.140:30300", // core-devin-node-20 core-devin-eu-fr-idf
}

// KolibaBootnodes are the enode URLs of the P2P bootstrap nodes running on the
Expand Down
2 changes: 1 addition & 1 deletion params/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
// Genesis hashes to enforce below configs on.
var (
MainnetGenesisHash = common.HexToHash("0x6894bcf15a005884af1253227df1057885f2ccff132eff7665f9761b7e3ea98a")
DevinGenesisHash = common.HexToHash("0x25136ab482099b96d8ffd5b491ca2d59be81aba2d11f6057297c578f14cce015")
DevinGenesisHash = common.HexToHash("0x21611412ade2545d2d37d318db038c04485a0b590c48e0ccb6e7c4f83136def7")
KolibaGenesisHash = common.HexToHash("0x4d22056fa4d6321bf031c046f040a370128b10a557f620c2d169c6655e6ba30c")
)

Expand Down
2 changes: 1 addition & 1 deletion params/network_params.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const (
BloomConfirms = 256

// CHTFrequency is the block frequency for creating CHTs
CHTFrequency = 32768
CHTFrequency = 2048

// BloomTrieFrequency is the block frequency for creating BloomTrie on both
// server/client sides.
Expand Down
2 changes: 1 addition & 1 deletion params/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
const (
VersionMajor = 1 // Major version component of the current release
VersionMinor = 0 // Minor version component of the current release
VersionPatch = 43 // Patch version component of the current release
VersionPatch = 44 // Patch version component of the current release
VersionMeta = "stable" // Version metadata to append to the version string
)

Expand Down

0 comments on commit 0b4b941

Please sign in to comment.