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

En 7380 early end of epoch #2267

Merged
merged 19 commits into from
Oct 8, 2020
Merged

Conversation

iulianpascalau
Copy link
Contributor

@iulianpascalau iulianpascalau commented Sep 3, 2020

  • added early end of epoch implementation that can be used in the hardfork process
  • changed how bech32PubkeyConverter does the stack dump
  • added interceptor & resolver debugger in hardfork exporter

@iulianpascalau iulianpascalau marked this pull request as ready for review September 8, 2020 06:31
# Conflicts:
#	integrationTests/multiShard/smartContract/scCallingSC_test.go
@@ -9,6 +9,7 @@ import (
"time"

"github.com/ElrondNetwork/elrond-go/crypto/peerSignatureHandler"
"github.com/ElrondNetwork/elrond-go/epochStart/notifier"

Copy link
Contributor

Choose a reason for hiding this comment

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

Remove empty line.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

fi

if [ -z "$2" ]; then
echo "epoch argument was not provided. Usage: './hardfork.sh [epoch: number] [forced: true|false]' as in './hardfork.sh 1 false'"
Copy link
Contributor

Choose a reason for hiding this comment

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

forced argument, not epoch

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@@ -99,7 +99,7 @@ func TestTrigger_TriggerCanNotExecuteShouldErr(t *testing.T) {

expectedErr := errors.New("expected error")
ws := startNodeServer(&mock.HardforkFacade{
TriggerCalled: func(epoch uint32) error {
TriggerCalled: func(epoch uint32, forced bool) error {
Copy link
Contributor

Choose a reason for hiding this comment

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

forced not used

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@@ -144,7 +144,7 @@ func TestTrigger_ManualShouldWork(t *testing.T) {
}
buffHr, _ := json.Marshal(hr)
ws := startNodeServer(&mock.HardforkFacade{
TriggerCalled: func(epoch uint32) error {
TriggerCalled: func(epoch uint32, forced bool) error {
Copy link
Contributor

Choose a reason for hiding this comment

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

forced not used

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@@ -18,14 +18,15 @@ const (

// FacadeHandler interface defines methods that can be used by the gin webserver
type FacadeHandler interface {
Trigger(epoch uint32) error
Trigger(epoch uint32, forced bool) error
Copy link
Contributor

Choose a reason for hiding this comment

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

withEarlyEndOfEpoch

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

)

// TriggerHandler defines the functionalities for an start of epoch trigger
type TriggerHandler interface {
Close() error
ForceEpochStart(round uint64) error
ForceEpochStart()
Copy link
Contributor

Choose a reason for hiding this comment

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

Don't you need current round?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

nope, it is taken automatically as the next possible round. Took into consideration the MinRoundsBetweenEpochs config value

@@ -202,7 +205,16 @@ func (t *trigger) computeAndSetTrigger(epoch uint32, originalPayload []byte) (bo
t.recordedTriggerMessage = originalPayload
}

if epoch > t.epochProvider.MetaEpoch() {
if forced {
Copy link
Contributor

Choose a reason for hiding this comment

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

With early end of eppch

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

- added more debug prints for hardfork
bogdan-rosianu
bogdan-rosianu previously approved these changes Sep 8, 2020
bogdan-rosianu
bogdan-rosianu previously approved these changes Sep 9, 2020
# Conflicts:
#	integrationTests/testInitializer.go
@LucianMincu LucianMincu merged commit feff860 into development Oct 8, 2020
@LucianMincu LucianMincu deleted the EN-7380-early-end-of-epoch branch October 8, 2020 08:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants