The code for issuing "border tokens", giving a random person the ability to issue one more. This mechanism is used to allow the swarm to grow as fast as it wants. Think a colony of bacteria, or a zygote, blob-growth.
function issueBorderToken() {
require(borderTokenAllocation[registry[msg.sender].id] >= 1);
borderTokenAllocation[registry[msg.sender].id]--;
borderToken[msg.sender]++;
uint i = 0;
while(borderTokenUtility[i].length == 0) i++;
uint randomPeer = getRandomNumber() % borderTokenUtility[i].length;
borderTokenAllocation[borderTokenUtility[i][randomPeer]]++;
borderTokenUtility[i+1].push(borderTokenUtility[i][randomPeer]);
borderTokenUtility[i][randomPeer] = borderTokenUtility[i][borderTokenUtility[i].length - 1];
borderTokenUtility[i].length--;
}
Here's the overall structure for managing events, all organized in a single object, struct PseudonymEvent {}
. The only scheduling needed is genesisEvent + eventCounter*28 days + p[e()].hour
.
Very simple. Always on the weekend for all time zones, base hour 07:00 Saturday UTC, set with genesisEvent
.
uint genesisEvent = 1580540400;
uint eventCounter;
function e() returns (uint) {return eventCounter; }
uint[] clockwork;
struct Reg {
bool rank;
uint id;
bool[] signatures;
bool verified;
}
struct PseudonymEvent {
uint hour;
mapping(address => Reg) registry;
mapping(bool => mapping(uint => address)) registryIndex;
uint[][2] index;
mapping(bool => mapping(uint => uint)) indexLookup;
uint[][2] courtUtility;
mapping(uint => uint) borderTokenAllocation;
uint[][] borderTokenUtility;
mapping(address => uint) borderToken;
mapping(address => uint) registrationToken;
mapping(address => uint) verifiedToken;
mapping(address => bool) proofOfPersonhood;
}
PseudonymEvent[] p;
@edicted something to peak your interest ;).
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
excellent work you have been doing great :)
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Congratulations @johan-nygren! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :
You can view your badges on your Steem Board and compare to others on the Steem Ranking
If you no longer want to receive notifications, reply to this comment with the word
STOP
To support your work, I also upvoted your post!
Vote for @Steemitboard as a witness to get one more award and increased upvotes!
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit