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

BSIP 40: Tests of special custom authorities #2081

Merged
merged 5 commits into from Dec 28, 2019

Conversation

MichelSantos
Copy link
Contributor

@MichelSantos MichelSantos commented Dec 10, 2019

Tests to confirm new custom authority templates for restricted trading, for voting, and for changing a witness signing key

tests/tests/custom_authority_tests.cpp Outdated Show resolved Hide resolved
vector<restriction>{restriction(asset_id_index, FUNC(eq),
asset_id_type(
bcoin2.id.instance()))})};
restriction sell_bcoin_rx = restriction(dummy_index, FUNC(logical_or),
Copy link
Contributor

@pmconrad pmconrad Dec 10, 2019

Choose a reason for hiding this comment

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

Maybe replace one of the logical_or with a list in function?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was a very good suggestion Peter. By using the in function, the full set of pairs could be combined and only consume 9 restrictions with almost limitless assets on either side of the permitted exchange sets.

Another benefit is that 9 restrictions is less than the likely 10 restriction limit per custom authority which means that the restricted trading can be described by one custom authority rather than 2 custom authorities.

tests/tests/custom_authority_tests.cpp Show resolved Hide resolved
tests/tests/custom_authority_tests.cpp Show resolved Hide resolved
@pmconrad
Copy link
Contributor

Created #2082 for documenting the weaknesses.

Copy link
Contributor

@pmconrad pmconrad left a comment

Choose a reason for hiding this comment

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

Looks good, thanks!

@pmconrad pmconrad merged commit 3250dc1 into bitshares:release Dec 28, 2019
@abitmore abitmore added this to In development in Protocol Upgrade Release (4.0.0) via automation Dec 28, 2019
@MichelSantos MichelSantos deleted the bsip40-unit-tests branch January 6, 2020 21:07
@abitmore abitmore moved this from In development to Done in Protocol Upgrade Release (4.0.0) Feb 2, 2020
@abitmore abitmore added this to In Development in Protocol Upgrade Release (6.0.0) via automation May 29, 2020
@abitmore abitmore removed this from In Development in Protocol Upgrade Release (6.0.0) Sep 29, 2021
@abitmore abitmore added this to In progress in Protocol Upgrade Release (7.0.0) via automation Sep 29, 2021
@abitmore abitmore removed this from In progress in Protocol Upgrade Release (7.0.0) Sep 25, 2023
@abitmore abitmore added this to In progress in Protocol Upgrade Release (8.0.0) via automation Sep 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

None yet

3 participants