Improved Seekia's slogan and Whitepaper.md.

This commit is contained in:
Simon Sarasova 2024-06-21 08:47:06 +00:00
parent 019b1a577e
commit 6ef86d1dfe
No known key found for this signature in database
GPG key ID: EEDA4103C9C36944
16 changed files with 177 additions and 163 deletions

View file

@ -6,6 +6,7 @@ Small and insignificant changes may not be included in this log.
## Unversioned Changes
* Improved Seekia's slogan and Whitepaper.md. - *Simon Sarasova*
* Added an Estimated Time Remaining label to 2 processes within the Create Genetic Models utility. - *Simon Sarasova*
* Split the createGeneticAnalysis package into 2 packages: createPersonGeneticAnalysis and createCoupleGeneticAnalysis. - *Simon Sarasova*
* Upgraded Circl to version 1.3.9. - *Simon Sarasova*

View file

@ -9,4 +9,4 @@ Many other people have written code for modules which are imported by Seekia. Th
Name | Date Of First Commit | Number Of Commits
--- | --- | ---
Simon Sarasova | June 13, 2023 | 257
Simon Sarasova | June 13, 2023 | 258

View file

@ -6,11 +6,11 @@
![Seekia Homepage](./resources/markdownImages/seekiaHomepage.jpg)
*Cure racial loneliness. Beautify the human species. Seekia: Be race aware.*
*Cure racial loneliness. Facilitate eugenic breeding. Seekia: Be race and genetics aware.*
**Seekia is a race aware mate discovery network.**
**Seekia is a race and genetics aware mate discovery network.**
Seekia is a mate discovery network where users can find a mate while having a deep awareness of each potential partner's race.
Seekia is a mate discovery network where users can find a mate while having a deep awareness of each potential partner's race and genetics.
Users can share racial information in their profiles such as their eye, skin, and hair color; hair texture; and the alleles in their genome which effect physical traits. Users can also share their genetic ancestry, which correlates to their race.

View file

@ -271,11 +271,11 @@ If you are defining a nested function, you must indent the lines containing the
```Go
newFunction := func(){
log.Println("Be Race Aware")
log.Println("Seekia: A race and genetics aware mate discovery network.")
}
newButton := widget.NewButton("Select Me", func(){
log.Println("Be Race Aware")
log.Println("Seekia: A race and genetics aware mate discovery network.")
})
```

View file

@ -6,9 +6,7 @@ New releases will created from this document and exported as PDFs.
## Seekia
Be Race Aware
A race aware mate discovery network.
A race and genetics aware mate discovery network.
## Introduction
@ -16,6 +14,8 @@ The human species is a fascinating biological phenomenon with a complex and myst
What has resulted is a species which possesses astounding beauty and biodiversity.
## Race
We can classify humans into different races. Races are defined by grouping humans by genetic attributes such as skin, eye and hair color; skin and hair texture; facial structure, and the alleles in their genomes which effect physical traits. If a human is sufficiently different from any other human, they are considered the only member of a unique race. Classifications of racial groups are fuzzy and not fully discrete, because every human is genetically and physically unique.
We can also classify humans by their geographic ancestry by describing the locations where each person's ancestors lived at different times in history. Ancestry can be measured by analyzing genetic markers that a person shares with past human populations. Geographic distance was a significant impediment to gene flow between population groups for most of humanity's history. The humans within each isolated population group bred among themselves, resulting in the loss of genetic variation through the process of genetic drift. Consequently, members of these populations tend to be racially similar to each other.
@ -32,59 +32,71 @@ Racial loneliness has become an epidemic. It is the cause of significant despair
Global fertility collapse can be partially explained by the trend of marriage and reproduction delayment, a phenomenon which has been worsened by racial loneliness. Many humans have a biological and psychological desire to breed with humans who resemble them and to produce offspring who resemble them. People who desire for their mate and children to look like them are spending more time searching and waiting for a mate who resembles them. The goal of finding a mate who belongs to a person's own race is a practical impossibility for many.
## Beauty
## Genetic Quality
Human beauty is defined as the ability of a person's physical appearance to evoke feelings of sexual attraction, arousal, and pleasure in other humans. Beauty is subjective for each individual, but trends and patterns emerge when surveying large quantities of people. Human beauty ranking is calculated by comparing the sentiments expressed by large populations of humans. Some people are more beautiful than other people, and some races are more beautiful than other races. Human beauty inequality is an inevitable consequence of human appearance diversity.
Genetic quality is defined by four main attributes: beauty, health, intelligence, and personality. A human who is healthier, more beautiful, more intelligent, happier, and more virtuous than another person is genetically superior to them.
## The Beauty Crisis
Certain humans are higher in genetic quality than other humans, and certain races are collectively higher in genetic quality than other races. In other words, some humans are genetically superior to other humans, and some races are collectively genetically superior to other races.
The beauty crisis, also known as the beauty scarcity crisis, the beauty shortage, and the ugliness crisis, is one of the most dire and widespread issues plaguing humanity.
To demonstrate my point, let's compare humans and races to movies. There is no greatest movie, but there are still good movies and bad movies. Similarly, there does not exist a singular person or race which possesses the highest genetic quality, but there are higher and lower genetic quality humans and races.
The beauty crisis is defined as the modern scarcity of beautiful humans and the scarcity's negative effects on humanity's happiness and flourishing. The modern human species has collectively become much less beautiful than it was throughout most of human history.
The movie "The Matrix" (1999) is far more commonly enjoyed than "Battlefield Earth" (2000), thus, it is a higher quality movie. Similarly, a gorgeous, intelligent, witty, dazzling, kind firefighter is much more desired and loved than an ugly, diseased, depressed, crippled, deceptive, rude, thieving thug. Someone in our world may prefer the thug over the firefighter, but on average, humanity prefers the firefighter's genetic traits.
There are many causes to the modern beauty crisis. One primary cause is the increase in humanity's collective beauty standards. Humanity's modern exposure to the world's most beautiful people and races has caused our beauty standards to increase. I posit that modern humans collectively rate their peers as being much less beautiful than ancient humans rated their own peers. When humans were hunter gatherers living in small tribes, we typically had visual exposure to a much lower quantity of races. Ancient human beauty standards were typically formed by a person's exposure to members of their own race and races which were more similar to their own. Modern humans now have visual exposure to the world's most beautiful people and races via photos, videos, and in-person interactions. Humanity's modern widened exposure to a larger diversity of humans has expanded our collective beauty ranking bounds to include all of the world's ugliest and most beautiful people and races. Digital beautification technologies and artificially generated humans have also exposed us to gorgeous humans that are more beautiful than any real-life human beings. Frequent exposure to highly beautiful human specimens has desensitized the parts of our brains which respond to beauty, causing us to perceive people as being uglier.
The world becomes a better place when it has more good movies and fewer bad movies. Similarly, the world becomes a better place when it is populated with humans and races of a higher genetic quality rather than those of a lower genetic quality.
Beauty exposure's effect of increasing humanity's beauty standards is very difficult to undo. The best treatment for people living in modern times is to cease consumption of media which depicts beautiful people to attempt to reset one's beauty standards. Unfortunately, this will never reset humanity's beauty standards to the state they existed in for ancient humans. Firstly, most humans will still be exposed to a larger diversity of races in their daily lives than ancient humans were exposed to due to advances in transportation technology, which have enabled the spread all of the world's races to all regions of the world. Secondly, it is very difficult to unsee and forget beautiful people and races. Forgetting someone's face can take decades, and it is usually impossible to forget the beauty of a race or particular anatomical structures. People should avoid consuming content which depicts beautiful people as early in life as possible, especially pornography. One possible way to decrease a person's beauty standards is a novel technology which could involve showing a person photos of ugly people while giving them some form of therapeutic stimulation. Some ideas include a cocktail of drugs, electricity to the brain, brain-machine interfaces, and magnetism to the brain.
### Beauty
The second major cause of the modern beauty crisis is the obesity crisis. Modern technology has caused and enabled people to become more obese than ever before. Rates of obesity have skyrocketed over the past century, causing humans to become much uglier. Some of the heaviest humans of all time are alive today. We are living in an age of unprecedented ugliness.
Human beauty is defined as the ability of a person's physical appearance to evoke feelings of sexual attraction, arousal, and pleasure in other humans. Beauty is subjective for each individual, but trends and patterns emerge when surveying large quantities of people. Human beauty ranking is calculated by comparing the sentiments expressed by large populations of humans. Some people are more beautiful than other people, and some races are collectively more beautiful than other races. Human beauty inequality is an inevitable consequence of human appearance diversity.
We are also living in an age of unprecedented beauty. Dentistry, teeth straightening braces, supplements, skin creams, and various other technologies have helped to produce some of the most beautiful humans of all time. Modern beautification technologies have unfortunately not been powerful enough to offset the uglifying effects of our modern world.
### Intelligence
The beauty crisis is one of the most significant issues plaguing humankind. Humans have become less attracted to each other, exacerbating many societal ills.
Intelligence is defined as the ability to recognize patterns, be creative, and solve problems. Intelligence is entirely derived from the brain and is thus a genetic trait, but can be influenced by a person's environment. Some humans are smarter than other humans, and some races are collectively smarter than other races. Cognitive inequality explains much of the outcome disparities between different humans and races that exist in our modern world.
The beauty crisis is contributing to the global fertility crisis. Many people lament that they cannot find a mate who they feel is beautiful enough to engage in a relationship with who also feels the same way about them. Many people are choosing not to have children because they view themselves as ugly and do not want to create ugly offspring. These factors are increasing the prevalence of singledom and childlessness, which are both increasing the global rates of loneliness, depression, meaninglessness, and lassitude.
### Health
Modern unprecedented beauty exposure, beautification technologies, and modern society's uglifying effects on our species have all contributed to the emergence of the beauty inequality crisis. The beauty inequality crisis is defined as the modern widening of the gap between the beautifulest and the ugliest humans and the gap's negative effects on humanity. The size disparity between the most and least sexually desirable portions of humanity has grown substantially. A larger portion of humanity now wants to mate and breed with a smaller portion of humanity. Competition for access to the increasingly-scarce resource of beautiful people has grown fiercer than ever. The beauty disparity crisis has increased the prevalence of people who are deeply envious of beautiful people and their superior social, romantic, and career success.
Health is defined as the proper functioning and well-being of the human body. Health is associated with a longer lifespan, increased mobility, and an absence of pain and disease. Some people are healthier than other people, and some races are collectively healthier than other races.
Human beauty is also becoming more important for human happiness and wellbeing. If humanity's story is like a video game, we are running out of quests to complete. Robots are replacing humans for labor. Artificial intelligence will soon provide the answers to most solvable questions. Humanity will eventually solve most of the world's problems such as curing most diseases and giving most people access to food and shelter. We are reaching the end of philosophy where most ideas have been thought of and most quandaries have been solved. As a result of these factors, modern humans have fewer sources of meaning. Humanity's modern shortage of meaning is known as the meaning crisis. The creation and worship of beauty are becoming some of the only sources of meaning in people's lives. Humans are now pursuing indulgent lives of hedonism, romance with other humans, and immersion into artificial and natural beauty. Human beauty worship and sexual relationships have become even more important to a happy human life. Robots cannot solve the beauty crisis because sexual and emotional human contact are some of the only things robots are not able to replace or replicate.
### Personality
The optimal solution to the beauty crisis is to beautify the human species. The ideal way to make humans more beautiful is by improving their genetics.
Personality is defined as a person's thought patterns, behaviors, and methods for understanding, interacting with, and experiencing the world. Personality is largely genetic. Personality and intelligence are connected. Some people have better personalities than other people, and some races collectively have better personalities than other races. Some examples of positive personality traits are happiness, virtue, hopefulness, empathy, calmness, compassion, sociability, generosity, cleanliness, honesty, perseverance, and kindness.
## Eugenics
Eugenics is defined as any practice or process which improves humanity's genetic quality.
Eugenics can be observed in many different processes. Diseases which disproportionately kill weak, disabled, and obese people can improve humanity's genetics by reducing the prevalence of their inferior genes. Long periods of drought and poor weather can improve humanity's genetics by causing unintelligent people who did not stockpile enough food to die.
Human mating has historically been a eugenic process. Evolution has favored positive genetic traits such as health, intelligence, beauty, and sociability. The fittest humans of the best genetic quality were able to live healthier and longer lives, attract the highest quality mates, and produce the greatest quantity of offspring. The processes of natural, artificial, and sexual selection caused the genetics of our species to improve.
One limitation of historical human eugenic mating is that people have had to infer the genetic quality of their potential mates from each person and their relatives' outwardly visible genetic traits. Sometimes, someone may possess superior genetic traits, but possesses an overall lower genetic quality genome. There are also certain mate pairings which result in lower genetic quality offspring due to incompatibilities in each mate's genome. With modern technology, we now have a way of sequencing human genomes, helping us to understanding who actually has the best genetics, and how we can pair up humans in the optimal way to improve humanity's genetics.
## Seekia
*App home page image*
To help cure racial loneliness and beautify the human species, I present Seekia: a race aware mate discovery network.
To help cure racial loneliness and facilitate eugenic breeding, I present Seekia: a race and genetics aware mate discovery network.
Seekia is a mate discovery network where users can find a mate while having a deep awareness of each potential partner's race. Users can share racial information in their profiles such as their eye, skin, and hair color; hair texture; and the alleles in their genome which effect physical traits. Users can also share their genetic ancestry, which is correlated to their race.
Seekia is a mate discovery network where users can find a mate while having a deep awareness of each potential partner's race and genetics.
Users can share racial information in their profiles such as their eye, skin, and hair color; hair texture; and the alleles in their genome which effect physical traits. Users can also share their genetic ancestry, which is correlated to their race.
Seekia enables users to browse and filter potential mates by their racial attributes. Seekia can also calculate the racial characteristics for prospective offspring between users. Seekia allows for users to predict and choose the race of their offspring by selecting a mate who is the most capable and likely to produce offspring of their desired race.
Seekia helps users to find members of their own race to mate with, curing racial loneliness. Seekia aims to beautify the human species by enabling people to predict what their offspring will look like with each potential mate, helping to encourage breeding between people who will produce the most beautiful offspring who belong to the most beautiful races and possess the most beautiful traits. Seekia aims to help members of the most beautiful races to meet and have offspring, helping to increase the populations of the world's most beautiful races.
I will now describe an overview of the features and advantages of Seekia. The technicals of Seekia are described in greater detail in the Seekia documentation and code implementation.
## Eugenics
Eugenics is defined as any practice or process which improves humanity's genetic quality. Genetic quality is defined by four main attributes: beauty, health, intelligence, and personality. Seekia aims to improve humanity's genetic quality by making humans more beautiful, healthy, intelligent, virtuous, and happy.
Seekia aims to improve humanity's genetics by facilitating the eugenic technique of selective breeding. Selective breeding is the practice of breeding specific human pairs to produce humans of a higher genetic quality. By encouraging breeding between certain people, it is possible to increase humanity's overall beauty, health, intelligence, virtue, and happiness. This technique is akin to combining the same set of foods together to create either 5 delicious meals or 5 revolting meals.
Seekia enables users to browse and filter potential mates by their racial attributes. Seekia can also calculate the racial characteristics for prospective offspring between users. Seekia allows for users to predict and choose the race of their offspring by selecting a mate who is the most capable and likely to produce offspring of their desired race. Seekia helps users to find members of their own race to mate with, curing racial loneliness.
Seekia provides users with the ability to mate in a genetics aware manner. Users can choose their mate in such a way to reduce the probability of their offspring having genetic diseases and increase the probability of their offspring having certain traits.
Seekia aims to improve humanity's genetic quality by making humans more beautiful, healthy, intelligent, virtuous, and happy.
I will now describe an overview of the features and advantages of Seekia. The technicals of Seekia are described in greater detail in the Seekia documentation and code implementation.
## Selective Breeding
Seekia aims to improve humanity's genetics by facilitating the eugenic technique of selective breeding. Selective breeding is the practice of breeding specific human pairs to produce humans of a higher genetic quality. By encouraging breeding between certain people, it is possible to increase humanity's overall beauty, health, intelligence, virtue, and happiness. This technique is akin to combining the same set of foods together to create either 5 delicious meals or 5 revolting meals.
### Beauty
Seekia aims to beautify the human species by encouraging human mate pairings which will create the most beautiful offspring and increase the proportion of beautiful people and races on Earth. Seekia users will be able to choose their mate with a greater knowledge of what their offspring will look like, helping them to produce the most beautiful offspring belonging to the most beautiful races and possessing the most beautiful traits.
Seekia aims to beautify the human species by encouraging human mate pairings which will create the most beautiful offspring and increase the proportion of beautiful people and races on Earth. Seekia users will be able to choose their mate with a greater knowledge of what their offspring will look like, helping them to produce the most beautiful offspring belonging to the most beautiful races and possessing the most beautiful traits. Seekia aims to help members of the most beautiful races to meet and have offspring, helping to increase the populations of the world's most beautiful races.
### Health
@ -96,7 +108,7 @@ Seekia aims to make humanity more intelligent by encouraging breeding between sp
### Personality
Seekia aims to improve the personalities of the human species by encouraging breeding between specific human pairs who are more likely to produce offspring who are virtuous and happy. Virtue and happiness are strongly influenced by genetics. Seekia aims to improve the personalities of humanity by building a prediction system that can predict how happy and virtuous someone is from their genome, and measuring the virtue and happiness of many prospective offspring genomes for each potential couple. Users will be able to sort their matches by how good their offspring's personality is likely to be. The creation of the prediction system should utilize training data which contains many people's genomes and information about their personalities. Personality information should measure positive personality traits such as happiness, virtue, hopefulness, empathy, calmness, compassion, sociability, generosity, cleanliness, honesty, perseverance, and kindness.
Seekia aims to improve the personalities of the human species by encouraging breeding between specific human pairs who are more likely to produce offspring who are virtuous and happy. Virtue and happiness are strongly influenced by genetics. Seekia aims to improve the personalities of humanity by building a prediction system that can predict how happy and virtuous someone is from their genome, and measuring the virtue and happiness of many prospective offspring genomes for each potential couple. Users will be able to sort their matches by how good their offspring's personality is likely to be. The creation of the prediction system should utilize training data which contains many people's genomes and information about their personalities.
## Open Source
@ -204,7 +216,7 @@ Facial similarity detection technology is another planned feature for Seekia. Th
## Genetics Aware
Seekia is also a genetics aware mate discovery network. Seekia gives users the ability to choose their mate in a way that maximizes the health of their offspring and increases the probability of their offspring possessing their desired traits.
Seekia is a genetics aware mate discovery network. Seekia gives users the ability to choose their mate in a way that maximizes the health of their offspring and increases the probability of their offspring possessing their desired traits.
The Seekia application is capable of producing genetic analyses on raw genome files. Users and couples can perform offline analyses of their genomes within the app. Genetic analyses are computed privately on user machines without uploading any data anywhere.

View file

@ -612,8 +612,8 @@ func setHomePage(window fyne.Window){
title := getPageTitleCentered("Home")
welcomeTitle := getBoldLabelCentered("Welcome to Seekia!")
welcomeMessage := getLabelCentered("Seekia is a race aware mate discovery network.")
welcomeMessage := getLabelCentered("Seekia is a race and genetics aware mate discovery network.")
exists, currentUserName := appUsers.GetCurrentAppUserName()
if (exists == false){

View file

@ -180,7 +180,7 @@ func setChooseAppUserPage(window fyne.Window){
logoSize := getCustomFyneSize(30)
seekiaLogo.SetMinSize(logoSize)
beRaceAwareLabel := getItalicLabelCentered("Be Race Aware")
seekiaDescriptionLabel := getItalicLabelCentered("Be race and genetics aware.")
selectLanguageTitle := getBoldLabel("Language:")
@ -195,7 +195,7 @@ func setChooseAppUserPage(window fyne.Window){
spacerA := widget.NewLabel("")
spacerB := widget.NewLabel("")
page := container.NewVBox(spacerA, spacerB, seekiaLogo, beRaceAwareLabel, widget.NewSeparator(), selectLanguageRow, widget.NewSeparator())
page := container.NewVBox(spacerA, spacerB, seekiaLogo, seekiaDescriptionLabel, widget.NewSeparator(), selectLanguageRow, widget.NewSeparator())
allUsersList, err := appUsers.GetAppUsersList()
if (err != nil){

View file

@ -70,8 +70,8 @@ func TestCompareInboxBounds(t *testing.T){
t.Fatalf("compareByteSlices failed test 4b.")
}
testBound3 := "beraceaware22222"
testBound4 := "beraceaware33333"
testBound3 := "seekia2222222222"
testBound4 := "seekia3333333333"
testBound3Bytes, err := inbox.ReadInboxString(testBound3)
if (err != nil) {
@ -170,7 +170,7 @@ func TestGetInboxesWithinRangeFunction(t *testing.T){
inRangeInbox1String := "aaaaaaaaaaaaaaaa"
inRangeInbox2String := "bbbbbbbbbbbbbbbb"
inRangeInbox3String := "cccccccccccccccc"
inRangeInbox4String := "beraceaware23456"
inRangeInbox4String := "seekia2222222222"
inRangeInbox1, err := inbox.ReadInboxString(inRangeInbox1String)
if (err != nil) {
@ -192,7 +192,7 @@ func TestGetInboxesWithinRangeFunction(t *testing.T){
t.Fatalf("inRangeInbox4String is invalid: " + err.Error())
}
outOfRangeInbox1String := "65432beraceaware"
outOfRangeInbox1String := "6543222222seekia"
outOfRangeInbox2String := "7777777777777777"
outOfRangeInbox1, err := inbox.ReadInboxString(outOfRangeInbox1String)

View file

@ -6,9 +6,9 @@ import "testing"
func TestHashes(t *testing.T) {
testData := []byte("CureRacialLoneliness.BeautifyTheHumanSpecies.Seekia:BeRaceAware.")
testData := []byte("Seekia:ARaceAndGeneticsAwareMateDiscoveryNetwork.")
expectedHashResult := "ea3c0d045257e361dd15b59c1934195990d9a03c634bc56373ce612d30d755cf5c6be2bfbeacbdf3086edcd224c01e2e3d40edcd4da4e536b6cc7d9e6296ca4e"
expectedHashResult := "4fa43b5aa023d62e9874655e2bd43c6f623a7820055f34d2907072e52aff2a2f59208c5b8d335fbb467f319c3cf83604f27495ed122b7d472bd8a8f07c7cd7da"
hashResult, err := blake3.GetBlake3HashAsHexString(64, testData)
if (err != nil) {
@ -29,7 +29,7 @@ func TestHashes(t *testing.T) {
if (err != nil) {
t.Fatalf("Failed to get 16 byte blake3 hash: " + err.Error())
}
if (outputHex != "ea3c0d045257e361dd15b59c19341959"){
if (outputHex != "4fa43b5aa023d62e9874655e2bd43c6f"){
t.Fatalf("16 byte blake3 hash provides invalid output: " + outputHex)
}
}

View file

@ -12,7 +12,7 @@ func TestChaPolyShrink(t *testing.T) {
for i := 0; i < 1000; i++{
stringToEncrypt += "BeRaceAware"
stringToEncrypt += "BeRaceAndGeneticsAware"
}
bytesToEncrypt := []byte(stringToEncrypt)

View file

@ -110,5 +110,3 @@ func CreateMemo(identityPublicKey [32]byte, identityPrivateKey [64]byte, identit
return newMemo, nil
}

View file

@ -59,9 +59,9 @@ func TestCreateMemos(t *testing.T){
memoMessage := `Cure racial loneliness.
Beautify the human species.
Facilitate eugenic breeding.
Seekia: Be race aware.`
Seekia: Be race and genetics aware.`
authorIdentityPublicKeyHex := "b26327a3e00e97a2759ac0a08a39c84f8edb833eec43669a81e27509f4ff6636"
@ -106,7 +106,7 @@ Seekia: Be race aware.`
t.Fatalf("Received author identity hash does not match: " + authorIdentityHashHex)
}
memoHashExpected := "191505401860f00d7a24837dc98130f2e6381f928d848e48720e4af2b72970df"
memoHashExpected := "4d00d199330a303c83b16dd1a5b28439eeb337fa0c58c486a0ec8bd7e96d7456"
memoHashBytes, err := encoding.DecodeHexStringToBytes(memoHashExpected)
if (err != nil){
@ -124,7 +124,7 @@ Seekia: Be race aware.`
t.Fatalf("GetBlockchainAddressFromMemoHash failed: " + err.Error())
}
if (ethereumAddress != "0xcc55D6D71E93eefF9f4103b8057e0B77F5881605"){
if (ethereumAddress != "0x60712e65a9fb11dDcdB8b4393c646571A9de26De"){
t.Fatalf("GetBlockchainAddressFromMemoHash returning unexpected Ethereum address: " + ethereumAddress)
}
@ -133,7 +133,7 @@ Seekia: Be race aware.`
t.Fatalf("GetBlockchainAddressFromMemoHash failed: " + err.Error())
}
if (cardanoAddress != "addr1v9j2ldvmmdxtr2aapgvnaknhw8rkxyv0ky9qwnqd8xlejrgnc83f6"){
if (cardanoAddress != "addr1v9zxpp0m6zxjn3ycmfkr9pzx8p8pcrdk7dfaka3swz6a3zgv0jegx"){
t.Fatalf("GetBlockchainAddressFromMemoHash returning unexpected Cardano address: " + cardanoAddress)
}

View file

@ -11,104 +11,12 @@ import "testing"
func TestReadMemo(t *testing.T){
testMemo := `| «« Seekia Memo »»
testMemo := `| << Seekia Memo >>
|
|- Signature:
| OBaIeYgbN6AqrlKRGo2K9v2y8L4_jk
| hRahKqgYvGbS3zv0cWDbmdZd4h4GMA
| _aZC2rX67dkBHoGOgzvrVguiDA==
|
|- Identity Key:
| 019f50f450efec14d5314e36685e6ccd
| 2a11026d206108a7e46ad1aa5778a36c
|
|- Author:
| ajcn6vesxwejdvwgj57bdo3m3dm
|
|- Memo:
|
| Cure racial loneliness.
|
| Beautify the human species.
|
| Seekia: Be race aware.
|
| «« End Of Memo »»`
memoIsValid, memoHash, authorIdentityHash, unarmoredMemoContent, err := readMemos.ReadMemo(testMemo)
if (err != nil){
t.Fatalf("Failed to read memo: " + err.Error())
}
if (memoIsValid == false){
t.Fatalf("Memo is not valid.")
}
expectedAuthorIdentityHashString := "ajcn6vesxwejdvwgj57bdo3m3dm"
expectedAuthorIdentityHash, _, err := identity.ReadIdentityHashString(expectedAuthorIdentityHashString)
if (err != nil){
t.Fatalf("Failed to read expectedAuthorIdentityHashString: " + err.Error())
}
if (authorIdentityHash != expectedAuthorIdentityHash){
authorIdentityHashHex := encoding.EncodeBytesToHexString(authorIdentityHash[:])
t.Fatalf("Received author identity hash does not match: " + authorIdentityHashHex)
}
memoHashExpected := "1cc8b5f73ec83b24db18814292ffd3139b6571be0d0a4ce7002de458525b0ea3"
memoHashBytes, err := encoding.DecodeHexStringToBytes(memoHashExpected)
if (err != nil){
t.Fatalf("Unable to read memoHashExpected: " + err.Error())
}
areEqual := bytes.Equal(memoHash[:], memoHashBytes)
if (areEqual == false){
memoHashHex := encoding.EncodeBytesToHexString(memoHash[:])
t.Fatalf("Received unexpected memo hash: " + memoHashHex)
}
ethereumAddress, err := readMemos.GetBlockchainAddressFromMemoHash("Ethereum", memoHash)
if (err != nil){
t.Fatalf("GetBlockchainAddressFromMemoHash failed: " + err.Error())
}
if (ethereumAddress != "0xc514B072e60F03568F0e136d30de210579ffA1F0"){
t.Fatalf("GetBlockchainAddressFromMemoHash returning unexpected Ethereum address: " + ethereumAddress)
}
cardanoAddress, err := readMemos.GetBlockchainAddressFromMemoHash("Cardano", memoHash)
if (err != nil){
t.Fatalf("GetBlockchainAddressFromMemoHash failed: " + err.Error())
}
if (cardanoAddress != "addr1vy0gfzl8muw3cstqhlage0nm5y9tyay3ueez4whya9qulpgpvytyu"){
t.Fatalf("GetBlockchainAddressFromMemoHash returning unexpected Cardano address: " + cardanoAddress)
}
expectedUnarmoredMemoContent := `Cure racial loneliness.
Beautify the human species.
Seekia: Be race aware.`
if (unarmoredMemoContent != expectedUnarmoredMemoContent){
t.Fatalf("Unexpected unarmoredMemoContent: " + unarmoredMemoContent)
}
}
// We use this to verify a legacy memo, where lines with no content were preceded with a pipe and 4 whitespace characters
// Now memos do not contain the 4 whitespace characters for these lines. They only contain a single pipe.
func TestReadMemo_Legacy(t *testing.T){
testMemo := `| «« Seekia Memo »»
|
|- Signature:
| ND8PfLLNZn7CJlQMokl7jvmd8yL5ee
| OGuJ6Jql_dN2BgANO8n9vYo9h5qPZL
| AUAmWM2D_PXJUwzOTxs6bUV1Bw==
| pdGm6I0srVFXXWZq4A7oV_mTXppHM1
| alVc2fWsnb5hZ3Rm7T7tqZJFWFVK2y
| 1J5n2Yhw3MjNvX6F0H4Kv_2nCA==
|
|- Identity Key:
| b26327a3e00e97a2759ac0a08a39c84f
@ -120,12 +28,12 @@ func TestReadMemo_Legacy(t *testing.T){
|- Memo:
|
| Cure racial loneliness.
|
| Facilitate eugenic breeding.
|
| Seekia: Be race aware.
|
| «« End Of Memo »»`
| Facilitate eugenic breeding.
|
| Seekia: Be race and genetics aware.
|
| << End Of Memo >>`
memoIsValid, memoHash, authorIdentityHash, unarmoredMemoContent, err := readMemos.ReadMemo(testMemo)
@ -148,7 +56,7 @@ func TestReadMemo_Legacy(t *testing.T){
t.Fatalf("Received author identity hash does not match: " + authorIdentityHashHex)
}
memoHashExpected := "c624a587458564a272a357c8bda79e51dfe4cbc1a995b612887ceafe54ad3b4f"
memoHashExpected := "4d00d199330a303c83b16dd1a5b28439eeb337fa0c58c486a0ec8bd7e96d7456"
memoHashBytes, err := encoding.DecodeHexStringToBytes(memoHashExpected)
if (err != nil){
@ -166,7 +74,7 @@ func TestReadMemo_Legacy(t *testing.T){
t.Fatalf("GetBlockchainAddressFromMemoHash failed: " + err.Error())
}
if (ethereumAddress != "0xb56159Dbe37A255915A113a12588447182eDDD06"){
if (ethereumAddress != "0x60712e65a9fb11dDcdB8b4393c646571A9de26De"){
t.Fatalf("GetBlockchainAddressFromMemoHash returning unexpected Ethereum address: " + ethereumAddress)
}
@ -175,7 +83,7 @@ func TestReadMemo_Legacy(t *testing.T){
t.Fatalf("GetBlockchainAddressFromMemoHash failed: " + err.Error())
}
if (cardanoAddress != "addr1vxerdvvcwxgvcwf23tjxp8kl9kg0rpe4dsvpsjfcguusk6sfn9c6h"){
if (cardanoAddress != "addr1v9zxpp0m6zxjn3ycmfkr9pzx8p8pcrdk7dfaka3swz6a3zgv0jegx"){
t.Fatalf("GetBlockchainAddressFromMemoHash returning unexpected Cardano address: " + cardanoAddress)
}
@ -183,7 +91,98 @@ func TestReadMemo_Legacy(t *testing.T){
Facilitate eugenic breeding.
Seekia: Be race aware.`
Seekia: Be race and genetics aware.`
if (unarmoredMemoContent != expectedUnarmoredMemoContent){
t.Fatalf("Unexpected unarmoredMemoContent: " + unarmoredMemoContent)
}
}
// We use this to verify a legacy memo, where lines with no content were preceded with a pipe and 4 whitespace characters
// Now memos do not contain the 4 whitespace characters for these lines. They only contain a single pipe.
func TestReadMemo_Legacy(t *testing.T){
testMemo := `| «« Seekia Memo »»
|
|- Signature:
| BZ8XRI1MpMsIUSAXKwCcl_kvi_InPU
| llBmnV7_xhJhhUtu8ICltCarCNDAhD
| 8dzOIywc6txZWyU9mAVNjnUMBQ==
|
|- Identity Key:
| c7cb2d0edfb3191dd2b6b6519cd04d49
| 7552415e4d02fe5bb6b485dd0bf8c1f3
|
|- Author:
| cohqu7plj76i6ndyw5mfg6ypd6r
|
|- Memo:
|
| This is a legacy Seekia memo.
|
| It is encoded differently from current memos.
|
| In legacy memos, lines without any content contain unnecessary whitespace.
|
| «« End Of Memo »»`
memoIsValid, memoHash, authorIdentityHash, unarmoredMemoContent, err := readMemos.ReadMemo(testMemo)
if (err != nil){
t.Fatalf("Failed to read memo: " + err.Error())
}
if (memoIsValid == false){
t.Fatalf("Memo is not valid.")
}
expectedAuthorIdentityHashString := "cohqu7plj76i6ndyw5mfg6ypd6r"
expectedAuthorIdentityHash, _, err := identity.ReadIdentityHashString(expectedAuthorIdentityHashString)
if (err != nil){
t.Fatalf("Failed to read expectedAuthorIdentityHashString: " + err.Error())
}
if (authorIdentityHash != expectedAuthorIdentityHash){
authorIdentityHashHex := encoding.EncodeBytesToHexString(authorIdentityHash[:])
t.Fatalf("Received author identity hash does not match: " + authorIdentityHashHex)
}
memoHashExpected := "5c25357e28a331044f9ac3fa045d5d510c4dd2f3cf42d9bbaf32e477a1674ab0"
memoHashBytes, err := encoding.DecodeHexStringToBytes(memoHashExpected)
if (err != nil){
t.Fatalf("Unable to read memoHashExpected: " + err.Error())
}
areEqual := bytes.Equal(memoHash[:], memoHashBytes)
if (areEqual == false){
memoHashHex := encoding.EncodeBytesToHexString(memoHash[:])
t.Fatalf("Received unexpected memo hash: " + memoHashHex)
}
ethereumAddress, err := readMemos.GetBlockchainAddressFromMemoHash("Ethereum", memoHash)
if (err != nil){
t.Fatalf("GetBlockchainAddressFromMemoHash failed: " + err.Error())
}
if (ethereumAddress != "0xe15139F38b36b7c82c7F61F8d819971dDBBfA698"){
t.Fatalf("GetBlockchainAddressFromMemoHash returning unexpected Ethereum address: " + ethereumAddress)
}
cardanoAddress, err := readMemos.GetBlockchainAddressFromMemoHash("Cardano", memoHash)
if (err != nil){
t.Fatalf("GetBlockchainAddressFromMemoHash failed: " + err.Error())
}
if (cardanoAddress != "addr1v8d6v893q05j6d47kz3dkvl9fpgy67r5c3qe4tgd4tyga0c27zq33"){
t.Fatalf("GetBlockchainAddressFromMemoHash returning unexpected Cardano address: " + cardanoAddress)
}
expectedUnarmoredMemoContent := `This is a legacy Seekia memo.
It is encoded differently from current memos.
In legacy memos, lines without any content contain unnecessary whitespace.`
if (unarmoredMemoContent != expectedUnarmoredMemoContent){
t.Fatalf("Unexpected unarmoredMemoContent: " + unarmoredMemoContent)

View file

@ -1,6 +1,10 @@
// Seekia: A race-aware mate discovery network.
// Cure racial loneliness. Beautify the human species. Be race aware.
// Seekia: A race and genetics aware mate discovery network.
//
// Cure racial loneliness.
// Facilitate eugenic breeding.
// Be race and genetics aware.
//
// Released into the public domain. (see Unlicense.md)
package main

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 46 KiB