diff --git a/node/config/config.go b/node/config/config.go index df54995..d3d3efd 100644 --- a/node/config/config.go +++ b/node/config/config.go @@ -137,7 +137,7 @@ var unlock *SignedGenesisUnlock func DownloadAndVerifyGenesis(network uint) (*SignedGenesisUnlock, error) { if network != 0 { unlock = &SignedGenesisUnlock{ - GenesisSeedHex: "726573697374206d7563682c206f626579206c6974746c657c00000000000000000000000A", + GenesisSeedHex: "726573697374206d7563682c206f626579206c6974746c657c00000000000000000000000B", Beacon: []byte{ 0x58, 0xef, 0xd9, 0x7e, 0xdd, 0x0e, 0xb6, 0x2f, 0x51, 0xc7, 0x5d, 0x00, 0x29, 0x12, 0x45, 0x49, diff --git a/node/config/version.go b/node/config/version.go index 6fb7959..3d7d0d8 100644 --- a/node/config/version.go +++ b/node/config/version.go @@ -40,5 +40,5 @@ func GetPatchNumber() byte { } func GetRCNumber() byte { - return 0x05 + return 0x06 } diff --git a/node/execution/intrinsics/token/application/token_handle_mint.go b/node/execution/intrinsics/token/application/token_handle_mint.go index dc7bce4..905b74b 100644 --- a/node/execution/intrinsics/token/application/token_handle_mint.go +++ b/node/execution/intrinsics/token/application/token_handle_mint.go @@ -177,27 +177,22 @@ func (a *TokenApplication) handleMint( zap.String("peer_id", base58.Encode([]byte(peerId))), zap.Uint64("frame_number", currentFrameNumber), ) - // testnet only, this is inline for mainnet: - if currentFrameNumber > 1100 { - lockMap[string(t.Signature.PublicKey.KeyValue)] = struct{}{} - return []*protobufs.TokenOutput{&protobufs.TokenOutput{ - Output: &protobufs.TokenOutput_Penalty{ - Penalty: &protobufs.ProverPenalty{ - Quantity: 10, - Account: &protobufs.AccountRef{ - Account: &protobufs.AccountRef_ImplicitAccount{ - ImplicitAccount: &protobufs.ImplicitAccount{ - ImplicitType: 0, - Address: altAddr.FillBytes(make([]byte, 32)), - }, + lockMap[string(t.Signature.PublicKey.KeyValue)] = struct{}{} + return []*protobufs.TokenOutput{&protobufs.TokenOutput{ + Output: &protobufs.TokenOutput_Penalty{ + Penalty: &protobufs.ProverPenalty{ + Quantity: 10, + Account: &protobufs.AccountRef{ + Account: &protobufs.AccountRef_ImplicitAccount{ + ImplicitAccount: &protobufs.ImplicitAccount{ + ImplicitType: 0, + Address: altAddr.FillBytes(make([]byte, 32)), }, }, }, }, - }}, nil - } else { - return nil, errors.Wrap(ErrInvalidStateTransition, "handle mint") - } + }, + }}, nil } } } @@ -211,27 +206,22 @@ func (a *TokenApplication) handleMint( zap.String("peer_id", base58.Encode([]byte(peerId))), zap.Uint64("frame_number", currentFrameNumber), ) - // testnet only, this is inline for mainnet: - if currentFrameNumber > 1100 { - lockMap[string(t.Signature.PublicKey.KeyValue)] = struct{}{} - return []*protobufs.TokenOutput{&protobufs.TokenOutput{ - Output: &protobufs.TokenOutput_Penalty{ - Penalty: &protobufs.ProverPenalty{ - Quantity: 10, - Account: &protobufs.AccountRef{ - Account: &protobufs.AccountRef_ImplicitAccount{ - ImplicitAccount: &protobufs.ImplicitAccount{ - ImplicitType: 0, - Address: altAddr.FillBytes(make([]byte, 32)), - }, + lockMap[string(t.Signature.PublicKey.KeyValue)] = struct{}{} + return []*protobufs.TokenOutput{&protobufs.TokenOutput{ + Output: &protobufs.TokenOutput_Penalty{ + Penalty: &protobufs.ProverPenalty{ + Quantity: 10, + Account: &protobufs.AccountRef{ + Account: &protobufs.AccountRef_ImplicitAccount{ + ImplicitAccount: &protobufs.ImplicitAccount{ + ImplicitType: 0, + Address: altAddr.FillBytes(make([]byte, 32)), }, }, }, }, - }}, nil - } else { - return nil, errors.Wrap(ErrInvalidStateTransition, "handle mint") - } + }, + }}, nil } if !verified { @@ -272,27 +262,22 @@ func (a *TokenApplication) handleMint( zap.String("peer_id", base58.Encode([]byte(peerId))), zap.Uint64("frame_number", currentFrameNumber), ) - // testnet only, this is inline for mainnet: - if currentFrameNumber > 1100 { - lockMap[string(t.Signature.PublicKey.KeyValue)] = struct{}{} - return []*protobufs.TokenOutput{&protobufs.TokenOutput{ - Output: &protobufs.TokenOutput_Penalty{ - Penalty: &protobufs.ProverPenalty{ - Quantity: 10, - Account: &protobufs.AccountRef{ - Account: &protobufs.AccountRef_ImplicitAccount{ - ImplicitAccount: &protobufs.ImplicitAccount{ - ImplicitType: 0, - Address: altAddr.FillBytes(make([]byte, 32)), - }, + lockMap[string(t.Signature.PublicKey.KeyValue)] = struct{}{} + return []*protobufs.TokenOutput{&protobufs.TokenOutput{ + Output: &protobufs.TokenOutput_Penalty{ + Penalty: &protobufs.ProverPenalty{ + Quantity: 10, + Account: &protobufs.AccountRef{ + Account: &protobufs.AccountRef_ImplicitAccount{ + ImplicitAccount: &protobufs.ImplicitAccount{ + ImplicitType: 0, + Address: altAddr.FillBytes(make([]byte, 32)), }, }, }, }, - }}, nil - } else { - return nil, errors.Wrap(ErrInvalidStateTransition, "handle mint") - } + }, + }}, nil } hash := sha3.Sum256(newFrame.Output) pick := tries.BytesToUnbiasedMod(hash, uint64(parallelism)) @@ -316,27 +301,22 @@ func (a *TokenApplication) handleMint( zap.Uint64("frame_number", currentFrameNumber), zap.Int("proof_size", len(leaf)), ) - // testnet only, this is inline for mainnet: - if currentFrameNumber > 1100 { - lockMap[string(t.Signature.PublicKey.KeyValue)] = struct{}{} - return []*protobufs.TokenOutput{&protobufs.TokenOutput{ - Output: &protobufs.TokenOutput_Penalty{ - Penalty: &protobufs.ProverPenalty{ - Quantity: 10, - Account: &protobufs.AccountRef{ - Account: &protobufs.AccountRef_ImplicitAccount{ - ImplicitAccount: &protobufs.ImplicitAccount{ - ImplicitType: 0, - Address: altAddr.FillBytes(make([]byte, 32)), - }, + lockMap[string(t.Signature.PublicKey.KeyValue)] = struct{}{} + return []*protobufs.TokenOutput{&protobufs.TokenOutput{ + Output: &protobufs.TokenOutput_Penalty{ + Penalty: &protobufs.ProverPenalty{ + Quantity: 10, + Account: &protobufs.AccountRef{ + Account: &protobufs.AccountRef_ImplicitAccount{ + ImplicitAccount: &protobufs.ImplicitAccount{ + ImplicitType: 0, + Address: altAddr.FillBytes(make([]byte, 32)), }, }, }, }, - }}, nil - } else { - return nil, errors.Wrap(ErrInvalidStateTransition, "handle mint") - } + }, + }}, nil } wesoProver := crypto.NewWesolowskiFrameProver(a.Logger) @@ -450,8 +430,7 @@ func (a *TokenApplication) handleMint( }, }, ) - // testnet only, this is inline for mainnet: - if !verified && currentFrameNumber > 1100 { + if !verified { outputs = append(outputs, &protobufs.TokenOutput{ Output: &protobufs.TokenOutput_Penalty{ Penalty: &protobufs.ProverPenalty{ diff --git a/node/execution/intrinsics/token/token_execution_engine.go b/node/execution/intrinsics/token/token_execution_engine.go index 3bed5a9..6d4386b 100644 --- a/node/execution/intrinsics/token/token_execution_engine.go +++ b/node/execution/intrinsics/token/token_execution_engine.go @@ -591,8 +591,7 @@ func (e *TokenExecutionEngine) ProcessFrame( } // testnet: if len(o.Proof.Amount) == 32 && - !bytes.Equal(o.Proof.Amount, make([]byte, 32)) && - frame.FrameNumber > 1100 { + !bytes.Equal(o.Proof.Amount, make([]byte, 32)) { addr := string(o.Proof.Owner.GetImplicitAccount().Address) if _, ok := (*e.peerSeniority)[addr]; !ok { (*e.peerSeniority)[addr] = peerSeniorityItem{