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

Import db turbo mode #2348

Merged
merged 6 commits into from
Oct 8, 2020
Merged

Import db turbo mode #2348

merged 6 commits into from
Oct 8, 2020

Conversation

iulianpascalau
Copy link
Contributor

@iulianpascalau iulianpascalau commented Oct 7, 2020

  • added extra option in import-db mode that can skip headers signature checks
  • implemented disabled crypto components (suite, scalar, point, single signer & multi signer)
  • disabled heartbeat sender during the import-db process

@sasurobert sasurobert self-requested a review October 7, 2020 18:42
@iulianpascalau iulianpascalau self-assigned this Oct 7, 2020
@iulianpascalau iulianpascalau added the type:feature New feature or request label Oct 7, 2020
cmd/node/main.go Outdated
@@ -744,6 +751,7 @@ func startNode(ctx *cli.Context, log logger.Logger, version string) error {
KeyGen: cryptoParams.KeyGenerator,
PrivKey: cryptoParams.PrivateKey,
ActivateBLSPubKeyMessageVerification: systemSCConfig.StakingSystemSCConfig.ActivateBLSPubKeyMessageVerification,
UseMockSigVerifier: importDbNoSigCheckFlag,
Copy link
Contributor

Choose a reason for hiding this comment

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

UseDisabledSigVerifier

Copy link
Contributor Author

Choose a reason for hiding this comment

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

🥇

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

const signature = "signature"

// Disabled represents a disabled singlesigner implementation
type Disabled struct {
Copy link
Contributor

Choose a reason for hiding this comment

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

Disabled what ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

singlesig.Disabled, I think it's pretty obvious

Copy link
Contributor

Choose a reason for hiding this comment

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

DisabledSingleSig ? to keep the same pattern used above in crypto/signing/disabled/point.go -> DisabledPoint
and I think you can rename this file to singlesig.go and move it in crypto/signing/disabled/ folder alongside point.go ?

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, renamed. I would keep them as they are as to comply with the rest of the crypto package implementations.

@@ -9,6 +9,9 @@ import (
"github.com/ElrondNetwork/elrond-go/crypto"
"github.com/ElrondNetwork/elrond-go/crypto/peerSignatureHandler"
"github.com/ElrondNetwork/elrond-go/crypto/signing"
disabledCrypto "github.com/ElrondNetwork/elrond-go/crypto/signing/disabled"
disabledmultisig "github.com/ElrondNetwork/elrond-go/crypto/signing/disabled/multisig"
Copy link
Contributor

Choose a reason for hiding this comment

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

disabledMultiSig

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

@@ -9,6 +9,9 @@ import (
"github.com/ElrondNetwork/elrond-go/crypto"
"github.com/ElrondNetwork/elrond-go/crypto/peerSignatureHandler"
"github.com/ElrondNetwork/elrond-go/crypto/signing"
disabledCrypto "github.com/ElrondNetwork/elrond-go/crypto/signing/disabled"
disabledmultisig "github.com/ElrondNetwork/elrond-go/crypto/signing/disabled/multisig"
disabledsig "github.com/ElrondNetwork/elrond-go/crypto/signing/disabled/singlesig"
Copy link
Contributor

Choose a reason for hiding this comment

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

disabledSingleSig

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

iulianpascalau and others added 2 commits October 8, 2020 10:34
- removed a wrongly formatted print in interceptedUnsignedTransaction.go
const signature = "signature"

// Disabled represents a disabled multisigner implementation
type Disabled struct {
Copy link
Contributor

Choose a reason for hiding this comment

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

DisabledMultiSig ? to keep the same pattern used below in crypto/signing/disabled/point.go -> DisabledPoint
and I think you can rename this file to multisig.go and move it in crypto/signing/disabled/ folder alongside point.go ?

}()

d := &Disabled{}
recovInstance, err := d.Create(nil, 0)
Copy link
Contributor

Choose a reason for hiding this comment

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

recov comes from recovered ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes

Copy link
Contributor Author

Choose a reason for hiding this comment

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

changed

return nil
}

// Equal return false
Copy link
Contributor

Choose a reason for hiding this comment

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

returns

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

const signature = "signature"

// Disabled represents a disabled singlesigner implementation
type Disabled struct {
Copy link
Contributor

Choose a reason for hiding this comment

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

DisabledSingleSig ? to keep the same pattern used above in crypto/signing/disabled/point.go -> DisabledPoint
and I think you can rename this file to singlesig.go and move it in crypto/signing/disabled/ folder alongside point.go ?

return &disabledSuite{}
}

// returns the disabled string
Copy link
Contributor

Choose a reason for hiding this comment

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

// String ...

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

return pointLen
}

// CreatePoint create a disabledPoint instance
Copy link
Contributor

Choose a reason for hiding this comment

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

creates

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

return &disabledPoint{}
}

// CreatePointForScalar create a disabledPoint instance
Copy link
Contributor

Choose a reason for hiding this comment

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

creates

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

Copy link
Contributor

@LucianMincu LucianMincu left a comment

Choose a reason for hiding this comment

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

👍

@LucianMincu LucianMincu merged commit 6c391d2 into development Oct 8, 2020
@LucianMincu LucianMincu deleted the import-db-turbo-mode branch October 8, 2020 12:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants