Skip to content
Permalink
Browse files

Release Stable 2.0.3 (#712)

* Prepare beta release build 9 (#673)

* add lease to asset cmds (#575)

* fix Disassemble when multiple bnz have the same target label (#612)

add test

* Add PeerConnections to network telemetry (#607)

* Add PeerConnections to network telemetry.

* omit Endpoint for incoming connections.

* fix asset unit name display in goal account list (#633)

* Add --no-sig flag to goal clerk multisig sign (#647)

* add --no-sig flag to goal clerk multisig sign

* update err message

* change preimage -> template

* change template -> information

* Scan for ledger wallets more often (#638)

* add more robust ledger scanning, fix infinite recursion bug

* fix comment

* undo scan change

* still delete wallets we fail to close

* Improve missing msig preimage error message (#648)

* improve missing msig preimage error message

* improve err msg

* Add support for https for telemetry servers (#649)

* Add support for https for telemetry servers.

* typo : udo -> udp

* Fixed few typos.

* goal listpartkeys display error (#641)

* Add logging for the telemetry server connections (#661)

* Add logging for the telemetry server connections.

* Revert unintended change.

* Improve error message.

* Avoid upgrading boost on travis Mac builds (#669)

* specify a boost version for the mac build.

* try to prevent boost update on travis mac builds.

* Build 9
  • Loading branch information
tsachiherman committed Jan 15, 2020
1 parent 1bc1d4c commit 3c8eef8ec796eda899cdd8902e4cc507552d7f2c
@@ -374,7 +374,7 @@ func (store *proposalStore) lastRelevant(pv proposalValue) (p period, pinned boo
}

for per := range store.Relevant {
if per > p {
if per > p && store.Relevant[per] == pv {
p = per
}
}
@@ -1 +1 @@
2
3
@@ -161,6 +161,10 @@ func main() {
if err != nil {
fmt.Fprintln(os.Stdout, "error loading telemetry config", err)
}
if os.IsPermission(err) {
fmt.Fprintf(os.Stderr, "Permission error on accessing telemetry config: %v", err)
os.Exit(1)
}

// Apply telemetry override.
telemetryConfig.Enable = logging.TelemetryOverride(*telemetryOverride)
@@ -487,10 +487,10 @@ var listCmd = &cobra.Command{
if err == nil {
params, ok := creatorInfo.AssetParams[aid]
if ok {
unitName = "units"
if params.UnitName != "" {
unitName = params.UnitName
}
unitName = "units"
if params.AssetName != "" {
assetName = fmt.Sprintf(", name %s", params.AssetName)
}
@@ -859,7 +859,8 @@ var listParticipationKeysCmd = &cobra.Command{
if err == nil {
votingBytes := parts[fn].Voting.OneTimeSignatureVerifier
vrfBytes := parts[fn].VRF.PK
if string(onlineAccountInfo.Participation.ParticipationPK) == string(votingBytes[:]) &&
if onlineAccountInfo.Participation != nil &&
(string(onlineAccountInfo.Participation.ParticipationPK) == string(votingBytes[:])) &&
(string(onlineAccountInfo.Participation.VRFPK) == string(vrfBytes[:])) &&
(onlineAccountInfo.Participation.VoteFirst == uint64(parts[fn].FirstValid)) &&
(onlineAccountInfo.Participation.VoteLast == uint64(parts[fn].LastValid)) &&
@@ -70,6 +70,7 @@ func init() {
createAssetCmd.Flags().StringVarP(&txFilename, "out", "o", "", "Write transaction to this file")
createAssetCmd.Flags().BoolVarP(&sign, "sign", "s", false, "Use with -o to indicate that the dumped transaction should be signed")
createAssetCmd.Flags().StringVar(&noteBase64, "noteb64", "", "Note (URL-base64 encoded)")
createAssetCmd.Flags().StringVarP(&lease, "lease", "x", "", "Lease value (base64, optional): no transaction may also acquire this lease until lastvalid")
createAssetCmd.Flags().StringVarP(&noteText, "note", "n", "", "Note text (ignored if --noteb64 used also)")
createAssetCmd.Flags().BoolVarP(&noWaitAfterSend, "no-wait", "N", false, "Don't wait for transaction to commit")
createAssetCmd.MarkFlagRequired("total")
@@ -86,6 +87,7 @@ func init() {
destroyAssetCmd.Flags().StringVarP(&txFilename, "out", "o", "", "Write transaction to this file")
destroyAssetCmd.Flags().BoolVarP(&sign, "sign", "s", false, "Use with -o to indicate that the dumped transaction should be signed")
destroyAssetCmd.Flags().StringVar(&noteBase64, "noteb64", "", "Note (URL-base64 encoded)")
destroyAssetCmd.Flags().StringVarP(&lease, "lease", "x", "", "Lease value (base64, optional): no transaction may also acquire this lease until lastvalid")
destroyAssetCmd.Flags().StringVarP(&noteText, "note", "n", "", "Note text (ignored if --noteb64 used also)")
destroyAssetCmd.Flags().BoolVarP(&noWaitAfterSend, "no-wait", "N", false, "Don't wait for transaction to commit")

@@ -105,6 +107,7 @@ func init() {
configAssetCmd.Flags().BoolVarP(&sign, "sign", "s", false, "Use with -o to indicate that the dumped transaction should be signed")
configAssetCmd.Flags().StringVar(&noteBase64, "noteb64", "", "Note (URL-base64 encoded)")
configAssetCmd.Flags().StringVarP(&noteText, "note", "n", "", "Note text (ignored if --noteb64 used also)")
configAssetCmd.Flags().StringVarP(&lease, "lease", "x", "", "Lease value (base64, optional): no transaction may also acquire this lease until lastvalid")
configAssetCmd.Flags().BoolVarP(&noWaitAfterSend, "no-wait", "N", false, "Don't wait for transaction to commit")
configAssetCmd.MarkFlagRequired("manager")

@@ -123,6 +126,7 @@ func init() {
sendAssetCmd.Flags().StringVarP(&txFilename, "out", "o", "", "Write transaction to this file")
sendAssetCmd.Flags().BoolVarP(&sign, "sign", "s", false, "Use with -o to indicate that the dumped transaction should be signed")
sendAssetCmd.Flags().StringVar(&noteBase64, "noteb64", "", "Note (URL-base64 encoded)")
sendAssetCmd.Flags().StringVarP(&lease, "lease", "x", "", "Lease value (base64, optional): no transaction may also acquire this lease until lastvalid")
sendAssetCmd.Flags().StringVarP(&noteText, "note", "n", "", "Note text (ignored if --noteb64 used also)")
sendAssetCmd.Flags().BoolVarP(&noWaitAfterSend, "no-wait", "N", false, "Don't wait for transaction to commit")
sendAssetCmd.MarkFlagRequired("to")
@@ -142,6 +146,7 @@ func init() {
freezeAssetCmd.Flags().BoolVarP(&sign, "sign", "s", false, "Use with -o to indicate that the dumped transaction should be signed")
freezeAssetCmd.Flags().StringVar(&noteBase64, "noteb64", "", "Note (URL-base64 encoded)")
freezeAssetCmd.Flags().StringVarP(&noteText, "note", "n", "", "Note text (ignored if --noteb64 used also)")
freezeAssetCmd.Flags().StringVarP(&lease, "lease", "x", "", "Lease value (base64, optional): no transaction may also acquire this lease until lastvalid")
freezeAssetCmd.Flags().BoolVarP(&noWaitAfterSend, "no-wait", "N", false, "Don't wait for transaction to commit")
freezeAssetCmd.MarkFlagRequired("freezer")
freezeAssetCmd.MarkFlagRequired("account")
@@ -230,6 +235,7 @@ var createAssetCmd = &cobra.Command{
}

tx.Note = parseNoteField(cmd)
tx.Lease = parseLease(cmd)

fv, lv, err := client.ComputeValidityRounds(firstValid, lastValid, numValidRounds)
if err != nil {
@@ -304,6 +310,7 @@ var destroyAssetCmd = &cobra.Command{
}

tx.Note = parseNoteField(cmd)
tx.Lease = parseLease(cmd)

firstValid, lastValid, err = client.ComputeValidityRounds(firstValid, lastValid, numValidRounds)
if err != nil {
@@ -391,6 +398,7 @@ var configAssetCmd = &cobra.Command{
}

tx.Note = parseNoteField(cmd)
tx.Lease = parseLease(cmd)

firstValid, lastValid, err = client.ComputeValidityRounds(firstValid, lastValid, numValidRounds)
if err != nil {
@@ -471,6 +479,7 @@ var sendAssetCmd = &cobra.Command{
}

tx.Note = parseNoteField(cmd)
tx.Lease = parseLease(cmd)

firstValid, lastValid, err = client.ComputeValidityRounds(firstValid, lastValid, numValidRounds)
if err != nil {
@@ -534,6 +543,7 @@ var freezeAssetCmd = &cobra.Command{
}

tx.Note = parseNoteField(cmd)
tx.Lease = parseLease(cmd)

firstValid, lastValid, err = client.ComputeValidityRounds(firstValid, lastValid, numValidRounds)
if err != nil {
@@ -248,6 +248,21 @@ func parseNoteField(cmd *cobra.Command) []byte {
return noteBytes
}

func parseLease(cmd *cobra.Command) (leaseBytes [32]byte) {
// Parse lease field
if cmd.Flags().Changed("lease") {
leaseBytesRaw, err := base64.StdEncoding.DecodeString(lease)
if err != nil {
reportErrorf(malformedLease, lease, err)
}
if len(leaseBytesRaw) != 32 {
reportErrorf(malformedLease, lease, fmt.Errorf("lease length %d != 32", len(leaseBytesRaw)))
}
copy(leaseBytes[:], leaseBytesRaw)
}
return
}

var sendCmd = &cobra.Command{
Use: "send",
Short: "Send money to an address",
@@ -301,21 +316,9 @@ var sendCmd = &cobra.Command{
}
toAddressResolved := accountList.getAddressByName(toAddress)

// Parse lease field
var leaseBytes [32]byte
if cmd.Flags().Changed("lease") {
leaseBytesRaw, err := base64.StdEncoding.DecodeString(lease)
if err != nil {
reportErrorf(malformedLease, lease, err)
}
if len(leaseBytesRaw) != 32 {
reportErrorf(malformedLease, lease, fmt.Errorf("lease length %d != 32", len(leaseBytesRaw)))
}
copy(leaseBytes[:], leaseBytesRaw)
}

// Parse notes field
// Parse notes and lease fields
noteBytes := parseNoteField(cmd)
leaseBytes := parseLease(cmd)

// If closing an account, resolve that address as well
var closeToAddressResolved string
@@ -94,6 +94,9 @@ const (
soFlagError = "-s is not meaningful without -o"
infoRawTxIssued = "Raw transaction ID %s issued"
txPoolError = "Transaction %s kicked out of local node pool: %s"
addrNoSigError = "Exactly one of --address or --no-sig is required"
msigLookupError = "Could not lookup multisig information: %s"
msigParseError = "Multisig information parsing error: %s"

infoAutoFeeSet = "Automatically set fee to %d MicroAlgos"

@@ -34,6 +34,7 @@ import (
var (
addr string
msigAddr string
noSig bool
)

func init() {
@@ -44,8 +45,8 @@ func init() {

addSigCmd.Flags().StringVarP(&txFilename, "tx", "t", "", "Partially-signed transaction file to add signature to")
addSigCmd.Flags().StringVarP(&addr, "address", "a", "", "Address of the key to sign with")
addSigCmd.Flags().BoolVarP(&noSig, "no-sig", "n", false, "Fill in the transaction's multisig field with public keys and threshold information, but don't produce a signature")
addSigCmd.MarkFlagRequired("tx")
addSigCmd.MarkFlagRequired("address")

signProgramCmd.Flags().StringVarP(&programSource, "program", "p", "", "Program source to be compiled and signed")
signProgramCmd.Flags().StringVarP(&progByteFile, "program-bytes", "P", "", "Program binary to be signed")
@@ -76,12 +77,19 @@ var addSigCmd = &cobra.Command{
Long: `Start a multisig, or add a signature to an existing multisig, for a given transaction`,
Args: validateNoPosArgsFn,
Run: func(cmd *cobra.Command, _ []string) {

data, err := readFile(txFilename)
if err != nil {
reportErrorf(fileReadError, txFilename, err)
}

// --address and --no-sig are mutually exclusive, since if
// we're not signing we don't need an address
if addr == "" && !noSig {
reportErrorf(addrNoSigError)
} else if addr != "" && noSig {
reportErrorf(addrNoSigError)
}

dataDir := ensureSingleDataDir()
client := ensureKmdClient(dataDir)
wh, pw := ensureWalletHandleMaybePassword(dataDir, walletName, true)
@@ -98,9 +106,21 @@ var addSigCmd = &cobra.Command{
reportErrorf(txDecodeError, txFilename, err)
}

msig, err := client.MultisigSignTransactionWithWallet(wh, pw, stxn.Txn, addr, stxn.Msig)
if err != nil {
reportErrorf(errorSigningTX, err)
var msig crypto.MultisigSig
if noSig {
multisigInfo, err := client.LookupMultisigAccount(wh, stxn.Txn.Sender.String())
if err != nil {
reportErrorf(msigLookupError, err)
}
msig, err = msigInfoToMsig(multisigInfo)
if err != nil {
reportErrorf(msigParseError, err)
}
} else {
msig, err = client.MultisigSignTransactionWithWallet(wh, pw, stxn.Txn, addr, stxn.Msig)
if err != nil {
reportErrorf(errorSigningTX, err)
}
}

// The following line makes stxn.cachedEncodingLen incorrect, but it's okay because we're just serializing it to a file
@@ -181,11 +201,11 @@ var signProgramCmd = &cobra.Command{
}
multisigInfo, err := client.LookupMultisigAccount(wh, msigAddr)
if err != nil {
reportErrorf("could not lookup multisig address", err)
reportErrorf(msigLookupError, err)
}
msig, err := msigInfoToMsig(multisigInfo)
if err != nil {
reportErrorf("internal err processing msig: %s", err)
reportErrorf(msigParseError, err)
}
lsig.Msig = msig
}
@@ -747,6 +747,10 @@ type Local struct {

// EnableRequestLogger enabled the logging of the incoming requests to the telemetry server.
EnableRequestLogger bool

// PeerConnectionsUpdateInterval defines the interval at which the peer connections information is being sent to the
// telemetry ( when enabled ). Defined in seconds.
PeerConnectionsUpdateInterval int
}

// Filenames of config files within the configdir (e.g. ~/.algorand)
@@ -87,6 +87,7 @@ var defaultLocalV5 = Local{
TxSyncIntervalSeconds: 60,
TxSyncTimeoutSeconds: 30,
TxSyncServeResponseSize: 1000000,
PeerConnectionsUpdateInterval: 3600,
// DO NOT MODIFY VALUES - New values may be added carefully - See WARNING at top of file
}

@@ -138,6 +139,7 @@ var defaultLocalV4 = Local{
TxSyncIntervalSeconds: 60,
TxSyncTimeoutSeconds: 30,
TxSyncServeResponseSize: 1000000,

// DO NOT MODIFY VALUES - New values may be added carefully - See WARNING at top of file
}

@@ -347,7 +349,10 @@ func migrate(cfg Local) (newCfg Local, err error) {
if newCfg.CatchupParallelBlocks == defaultLocalV4.CatchupParallelBlocks {
newCfg.CatchupParallelBlocks = defaultLocalV5.CatchupParallelBlocks
}

if newCfg.PeerConnectionsUpdateInterval == defaultLocalV4.PeerConnectionsUpdateInterval {
newCfg.PeerConnectionsUpdateInterval = defaultLocalV5.PeerConnectionsUpdateInterval
}

newCfg.Version = 5
}

0 comments on commit 3c8eef8

Please sign in to comment.
You can’t perform that action at this time.