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

Box value of 0 (zero) should not be allowed on box construction and/or singing #221

Open
greenhat opened this issue Apr 18, 2023 · 1 comment

Comments

@greenhat
Copy link
Member

greenhat commented Apr 18, 2023

Following https://discord.com/channels/668903786361651200/1073484137131950091/1097795535886372926

Motivation

The node will reject it anyway.

Suggestion

Ideally, box value should be more than min value per byte * box size, but some compromises could be made, like in https://github.com/ergoplatform/sigma-rust/blob/e7bebc6ef7c7c6f5c05e4ae72ccd2e5690100284/ergotree-ir/src/chain/ergo_box/box_value.rs#L31-L47

@Luivatra
Copy link

Agree, min value per byte would be great. Had some surprises when moving from off chain appkit signing based test cases to on chain testing (some my fault for forgetting to set a value, but others due to box being too big for the usual 0.001 erg)

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

2 participants