Skip to content
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

improve mechanism for warnings in ui machines? #170

Open
janmazak opened this issue Aug 10, 2022 · 0 comments
Open

improve mechanism for warnings in ui machines? #170

janmazak opened this issue Aug 10, 2022 · 0 comments

Comments

@janmazak
Copy link
Collaborator

There is a weakness in the design of the security policy return value mechanism. Originally, at most 1 warning was displayed, as the first step of the state machine. That is no longer true, but the return value does not convey the reason for warning, and the ui state machines have to be linear (because of how the macros are written), and now it is not possible to avoid displaying the warning just by skipping the first ui step. Not easy to improve.

In policyForSignTxInit, there are functions for warnings:

	WARN_IF(needsMissingCollateralWarning(txSigningMode, numCollateralInputs));
	WARN_IF(needsUnknownCollateralWarning(txSigningMode, numCollateralInputs));
	WARN_IF(needsMissingScriptDataHashWarning(txSigningMode, includeScriptDataHash));

relevant only for Plutus signing mode but called outside of the switch case.

Also,

		// Plutus script cannot be executed without script data hash
		WARN_UNLESS(includeScriptDataHash);

in the above switch duplicates needsMissingScriptDataHashWarning.

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

No branches or pull requests

1 participant