Commit 891cd7d9 authored by David Enyeart's avatar David Enyeart Committed by Gerrit Code Review
Browse files

Merge "[FAB-12971] Disable prover service and token tx"

parents a5e5e849 64be3b0d
......@@ -381,32 +381,35 @@ func (v *TxValidator) validateTx(req *blockValidationRequest, results chan<- *bl
logger.Infof("Find chaincode upgrade transaction for chaincode %s on channel %s with new version %s", upgradeCC.ChaincodeName, upgradeCC.ChainID, upgradeCC.ChaincodeVersion)
txsUpgradedChaincode = upgradeCC
}
} else if common.HeaderType(chdr.Type) == common.HeaderType_TOKEN_TRANSACTION {
txID = chdr.TxId
if !v.Support.Capabilities().FabToken() {
logger.Errorf("FabToken capability is not enabled. Unsupported transaction type [%s] in block [%d] transaction [%d]",
common.HeaderType(chdr.Type), block.Header.Number, tIdx)
results <- &blockValidationResult{
tIdx: tIdx,
validationCode: peer.TxValidationCode_UNSUPPORTED_TX_PAYLOAD,
}
return
}
// FAB-12971 comment out below block before v1.4 cut. Will uncomment after v1.4.
/*
} else if common.HeaderType(chdr.Type) == common.HeaderType_TOKEN_TRANSACTION {
txID = chdr.TxId
if !v.Support.Capabilities().FabToken() {
logger.Errorf("FabToken capability is not enabled. Unsupported transaction type [%s] in block [%d] transaction [%d]",
common.HeaderType(chdr.Type), block.Header.Number, tIdx)
results <- &blockValidationResult{
tIdx: tIdx,
validationCode: peer.TxValidationCode_UNSUPPORTED_TX_PAYLOAD,
}
return
}
// Check if there is a duplicate of such transaction in the ledger and
// obtain the corresponding result that acknowledges the error type
erroneousResultEntry := v.checkTxIdDupsLedger(tIdx, chdr, v.Support.Ledger())
if erroneousResultEntry != nil {
results <- erroneousResultEntry
return
}
// Check if there is a duplicate of such transaction in the ledger and
// obtain the corresponding result that acknowledges the error type
erroneousResultEntry := v.checkTxIdDupsLedger(tIdx, chdr, v.Support.Ledger())
if erroneousResultEntry != nil {
results <- erroneousResultEntry
return
}
// Set the namespace of the invocation field
txsChaincodeName = &sysccprovider.ChaincodeInstance{
ChainID: channel,
ChaincodeName: "Token",
ChaincodeVersion: ""}
// Set the namespace of the invocation field
txsChaincodeName = &sysccprovider.ChaincodeInstance{
ChainID: channel,
ChaincodeName: "Token",
ChaincodeVersion: ""}
*/
} else if common.HeaderType(chdr.Type) == common.HeaderType_CONFIG {
configEnvelope, err := configtx.UnmarshalConfigEnvelope(payload.Data)
if err != nil {
......
......@@ -1455,6 +1455,7 @@ func validateTxWithStateBasedEndorsement(t *testing.T, l ledger.PeerLedger, v tx
}
func TestTokenValidTransaction(t *testing.T) {
t.Skip("Skipping TestTokenValidTransaction until token transaction is enabled after v1.4")
l, v := setupLedgerAndValidatorWithFabTokenCapabilities(t)
defer ledgermgmt.CleanupTestEnv()
defer l.Close()
......@@ -1484,10 +1485,11 @@ func TestTokenCapabilityNotEnabled(t *testing.T) {
// We expect the tx to be invalid because of a duplicate txid
txsfltr := lutils.TxValidationFlags(b.Metadata.Metadata[common.BlockMetadataIndex_TRANSACTIONS_FILTER])
assertion.True(txsfltr.IsInvalid(0))
assertion.True(txsfltr.Flag(0) == peer.TxValidationCode_UNSUPPORTED_TX_PAYLOAD)
assertion.True(txsfltr.Flag(0) == peer.TxValidationCode_UNKNOWN_TX_TYPE)
}
func TestTokenDuplicateTxId(t *testing.T) {
t.Skip("Skipping TestTokenDuplicateTxId until token transaction is enabled after v1.4")
theLedger := new(mockLedger)
vcs := struct {
*mocktxvalidator.Support
......
......@@ -73,6 +73,7 @@ var _ = Describe("Token EndToEnd", func() {
})
It("executes a basic solo network and submits token transaction", func() {
Skip("Skipping token e2e test until token transaction is enabled after v1.4")
By("getting the orderer by name")
orderer := network.Orderer("orderer")
......
......@@ -312,10 +312,11 @@ func serve(args []string) error {
defer service.GetGossipService().Stop()
// register prover grpc service
err = registerProverService(peerServer, aclProvider, signingIdentity)
if err != nil {
return err
}
// FAB-12971 disable prover service before v1.4 cut. Will uncomment after v1.4 cut
// err = registerProverService(peerServer, aclProvider, signingIdentity)
// if err != nil {
// return err
// }
// initialize system chaincodes
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment