Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

srml/staking:new_session was called twice almost at the same twice #3442

Closed
leahnoah opened this issue Aug 20, 2019 · 0 comments
Closed

srml/staking:new_session was called twice almost at the same twice #3442

leahnoah opened this issue Aug 20, 2019 · 0 comments

Comments

@leahnoah
Copy link

Hi, I run the node based on Substrate, and found the function new_session in srml/staking was sometimes called twice in a row almost at the same time. Would that result in rewarding twice in a row almost at the same time, even the era index not changed? Or the reward would only happen according to the second time?

Below is the snapshot of the log:
2019-08-20 12:26:36 Pre-sealed block for proposal at 508. Hash now 0x15ff508a9777566da31c07e72de4fe49d87abba69422a61a861317fef49adcf4, previously 0xb12e4a77cf0dc88d0d308a7c5472944578c211b5ccfd90bbe1fe79775e7aeaed.
///// start session index 52
2019-08-20 12:26:36 ////// on session ending
2019-08-20 12:26:36 /////era length 2, sessions per era 2
2019-08-20 12:26:36 force era NotForcing
2019-08-20 12:26:36 /////start session index52
/////the reward points as below ------NO.1
2019-08-20 12:26:36 /////total_points 404
2019-08-20 12:26:36 /////single points 102
2019-08-20 12:26:36 /////single points 100
2019-08-20 12:26:36 /////single points 102
2019-08-20 12:26:36 /////single points 100
2019-08-20 12:26:36 ///// era index 26
2019-08-20 12:26:36 Imported #508 (0x15ff…dcf4)
///// start session index 52 again!!!!
2019-08-20 12:26:36 ////// on session ending
2019-08-20 12:26:36 /////era length 2, sessions per era 2
2019-08-20 12:26:36 force era NotForcing
2019-08-20 12:26:36 /////start session index52
/////this time, the reward points changed ------NO.2
2019-08-20 12:26:36 /////total_points 404
2019-08-20 12:26:36 /////single points 102
2019-08-20 12:26:36 /////single points 100
2019-08-20 12:26:36 /////single points 82
2019-08-20 12:26:36 /////single points 120
2019-08-20 12:26:36 ///// era index 26
/////that means reorg
2019-08-20 12:26:36 Reorg from #508,0x15ff…dcf4 to #508,0xbd4a…5b2b, common ancestor #507,0x4684…362e

My question is:
Is it expected behavior?
Would there be twice reward actions? or only reward NO.1 happened? Or only reward NO.2 happened?

thanks

@leahnoah leahnoah closed this as completed Sep 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant