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

Deterministic UUID (System.Guid) generator for distributed actions #371

dahlia opened this issue Jul 26, 2019 · 1 comment · Fixed by #439


Copy link

commented Jul 26, 2019

Since actions are executed in a distributed network, these have to be deterministic so that they have the same result regardless of node. Therefore, we've provided APIs like IActionContext.Random to replace .NET's System.Random. (Disclaimer: Saying random numbers should be deterministic here could sound contradictory, but it technically means “random numbers should be unpredictable until a block is mined, and they should not change and be consistent between all nodes in a distributed network after a block is once mined.”)

However, for UUIDs (System.Guid values) we currently provide no correspondence to IActionContext.Random for this. Although library users could implement their own UUID generator built on IActionContext.Random, it's not only unhandy but also leads to make a mistake that a library user thoughtlessly use the System.Guid.NewGuid() method.

So I suggest to have an API to generate a System.Guid value in the same way IActionContext.Random generates a random number!

See also:

@dahlia dahlia added the suggestion label Jul 26, 2019

@dahlia dahlia added this to To do in PyCon Korea 2019 Aug 15, 2019


This comment has been minimized.

Copy link

commented Aug 15, 2019

i'll try this issue.

@longfin longfin moved this from To do to In progress in PyCon Korea 2019 Aug 15, 2019

@dahlia dahlia closed this in #439 Aug 16, 2019

PyCon Korea 2019 automation moved this from In progress to Done Aug 16, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants
You can’t perform that action at this time.