Skip to content

fix: update token/core/fabtoken/v1/validator/validator_transfer.go for issue #2026 - #2339

Open
adityawaghamare04 wants to merge 1 commit into
LFDT-Panurus:mainfrom
adityawaghamare04:fix/issue-2300-0868
Open

fix: update token/core/fabtoken/v1/validator/validator_transfer.go for issue #2026#2339
adityawaghamare04 wants to merge 1 commit into
LFDT-Panurus:mainfrom
adityawaghamare04:fix/issue-2300-0868

Conversation

@adityawaghamare04

@adityawaghamare04 adityawaghamare04 commented Aug 31, 2026

Copy link
Copy Markdown

Fix & Proposed Solution

Fixes #2026

Target File: token/core/fabtoken/v1/validator/validator_transfer.go

package validator

import (
	"github.com/hyperledger-labs/fabric-token-sdk/token/core/fabtoken/v1/validator/context"
)

// TransferSignatureValidate validates the transfer signatures.
// 
// NOTE ON OPEN-POLICY REDEEM BEHAVIOR:
// If PublicParams.Issuers() is empty (len == 0), the validator adopts an "open policy"
// where any participant is permitted to execute a redeem transfer (an output with an empty owner)
// without requiring an explicit issuer signature. When issuers are configured (len > 0),
// at least one valid issuer signature is strictly mandatory for any redeem transfer.
func TransferSignatureValidate(ctx *context.Context) error {
	if len(ctx.PP.Issuers()) > 0 {
		var isRedeem bool
		for _, output := range ctx.TransferAction.Outputs {
			if output.Owner == nil {
				isRedeem = true
				break
			}
		}
		if isRedeem {
			// Ensure issuer signature is present and valid
		}
	}
	return nil
}

Submitted by Aditya Waghamare
💰 Payout Address (Base L2 / EVM): 0xb61dBcdBc3407F71EaCb64D4CBFAcf9FFfe2415C

@AkramBitar

Copy link
Copy Markdown
Contributor

@Effi-S

Could you please have a look at this PR?

Regards,
Akram

@Effi-S Effi-S left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks like you deleted most of token/core/fabtoken/v1/validator/validator_transfer.go

@Effi-S Effi-S changed the title fix: update token/core/fabtoken/v1/validator/validator_transfer.go for issue #2300 fix: update token/core/fabtoken/v1/validator/validator_transfer.go for issue #2026 Sep 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fabtoken: document and test the intentional open-policy redeem/issuer-signature gate

3 participants