-
Notifications
You must be signed in to change notification settings - Fork 198
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
Import db turbo mode #2348
Conversation
iulianpascalau
commented
Oct 7, 2020
•
edited
edited
- 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
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, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UseDisabledSigVerifier
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🥇
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Disabled what ?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 ?
There was a problem hiding this comment.
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.
factory/cryptoComponents.go
Outdated
@@ -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" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
disabledMultiSig
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
factory/cryptoComponents.go
Outdated
@@ -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" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
disabledSingleSig
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
- removed a wrongly formatted print in interceptedUnsignedTransaction.go
const signature = "signature" | ||
|
||
// Disabled represents a disabled multisigner implementation | ||
type Disabled struct { |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
recov comes from recovered ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed
crypto/signing/disabled/point.go
Outdated
return nil | ||
} | ||
|
||
// Equal return false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
returns
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
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 ?
crypto/signing/disabled/suite.go
Outdated
return &disabledSuite{} | ||
} | ||
|
||
// returns the disabled string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// String ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
crypto/signing/disabled/suite.go
Outdated
return pointLen | ||
} | ||
|
||
// CreatePoint create a disabledPoint instance |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
creates
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
crypto/signing/disabled/suite.go
Outdated
return &disabledPoint{} | ||
} | ||
|
||
// CreatePointForScalar create a disabledPoint instance |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
creates
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍