Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chainconfig: add Shillin and Antenna hardfork on mainnet #365

Merged
merged 3 commits into from
Oct 4, 2023
Merged
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
9 changes: 7 additions & 2 deletions genesis/mainnet.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,16 @@
"consortiumV2Contracts": {
"roninValidatorSet": "0x617c5d73662282EA7FfD231E020eCa6D2B0D552f",
"slashIndicator": "0xEBFFF2b32fA0dF9C5C8C5d5AAa7e8b51d5207bA3",
"stakingContract": "0x545edb750eB8769C868429BE9586F5857A768758"
"stakingContract": "0x545edb750eB8769C868429BE9586F5857A768758",
"profileContract": "0x840EBf1CA767CB690029E91856A357a43B85d035",
"finalityTracking": "0xA30B2932CD8b8A89E34551Cdfa13810af38dA576"
Comment on lines +26 to +27
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checked. Seems ok.

},
"puffyBlock": 0,
"bubaBlock": 0,
"olekBlock": 24935500
"olekBlock": 24935500,
"shillinBlock": 28825400,
"antennaBlock": 28825400,
Comment on lines +32 to +33
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://app.roninchain.com/block/28825400 -> estimated hardfork time 14:00 UTC+7 Oct 26

"whiteListDeployerContractV2Address": "0xc1876d5C4BFAF0eE325E4226B2bdf216D9896AE1"
},
"alloc": {
"0x0000000000000000000000000000000000000011": {
Expand Down
15 changes: 13 additions & 2 deletions p2p/peer.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ type Peer struct {
wg sync.WaitGroup
protoErr chan error
closed chan struct{}
pingRecv chan struct{}
disc chan DiscReason

// events receives message send / receive events if set
Expand Down Expand Up @@ -244,6 +245,7 @@ func newPeer(log log.Logger, conn *conn, protocols []Protocol) *Peer {
disc: make(chan DiscReason),
protoErr: make(chan error, len(protomap)+1), // protocols + pingLoop
closed: make(chan struct{}),
pingRecv: make(chan struct{}, 16),
log: log.New("id", conn.node.ID(), "conn", conn.flags),
}
return p
Expand Down Expand Up @@ -304,9 +306,11 @@ loop:
}

func (p *Peer) pingLoop() {
ping := time.NewTimer(pingInterval)
defer p.wg.Done()

ping := time.NewTimer(pingInterval)
defer ping.Stop()

for {
select {
case <-ping.C:
Expand All @@ -315,6 +319,10 @@ func (p *Peer) pingLoop() {
return
}
ping.Reset(pingInterval)

case <-p.pingRecv:
SendItems(p.rw, pongMsg)

case <-p.closed:
return
}
Expand All @@ -341,7 +349,10 @@ func (p *Peer) handle(msg Msg) error {
switch {
case msg.Code == pingMsg:
msg.Discard()
go SendItems(p.rw, pongMsg)
select {
case p.pingRecv <- struct{}{}:
case <-p.closed:
}
case msg.Code == discMsg:
// This is the last message. We don't need to discard or
// check errors because, the connection will be closed after it.
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 = 2 // Major version component of the current release
VersionMinor = 6 // Minor version component of the current release
VersionPatch = 0 // Patch version component of the current release
VersionPatch = 2 // Patch version component of the current release
VersionMeta = "" // Version metadata to append to the version string
)

Expand Down