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

script to populate relay with events, fix nip-27 compatibility #8

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

ice-cronus
Copy link
Contributor

No description provided.

@ice-cronus ice-cronus requested a review from a team as a code owner October 9, 2024 16:24
database/query/query.go Show resolved Hide resolved
}
f.outputRelays = append(f.outputRelays, relay)
}
log.Println(fmt.Sprintf("Established %v conns to %v", threads, output))
Copy link
Contributor

Choose a reason for hiding this comment

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

log.Printf?

cmd/seeder/README.md Outdated Show resolved Hide resolved

imgbb "github.com/JohnNON/ImgBB"
"github.com/davidbyttow/govips/v2/vips"
"github.com/pkg/errors"
Copy link
Contributor

Choose a reason for hiding this comment

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

That's not needed anymore :)

Copy link
Contributor

@ice-ares ice-ares left a comment

Choose a reason for hiding this comment

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

pls check the figma of the home page (with the post feed) and try to generate all the information thats required there;

because what u generated is not enough;

also generate some videos as well; short ones <60s

Sample call:
```bash
sudo apt-get install -y libvips-dev # dynamic linking
seeder --relays=wss://relay.damus.io/ --outputRelay=wss://localhost:9998 --profilesCount=1000 --threads=100 --perUser=100 --uploadKey=...
Copy link
Contributor

Choose a reason for hiding this comment

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

name the cmd subzero-seeder

}
)

const concurrentReqs = 10
Copy link
Contributor

Choose a reason for hiding this comment

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

make it cpu dependant; and make it work optimally so we seed as fast as possible

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Its not about CPu its about notices from the relay where we fetch data from

"github.com/pkg/errors"
)

var images []string = []string{
Copy link
Contributor

Choose a reason for hiding this comment

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

Omg, no! If u cant download any file dynamically, use some api/lib to generate files.

Everything needs to be dynamic

@@ -362,7 +362,7 @@ func validateKindProfileMetadataEvent(e *Event) error {
}

func validateKindTextNoteEvent(e *Event) error {
if json.Valid([]byte(e.Content)) {
if strings.HasPrefix(e.Content, "{") && strings.HasSuffix(e.Content, "}") {
Copy link
Contributor

Choose a reason for hiding this comment

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

Huh? Why would it be JSON?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Issue here that 49 for example is a valid JSON, json is not only objects, but primitives also, it should be some kind of check isJSONObject(). If that's not ok, we can try to unmarshal it with map[string]any

Copy link
Contributor

Choose a reason for hiding this comment

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

then this change makes it worse; it makes all of them be JSON objects

Copy link
Contributor

Choose a reason for hiding this comment

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

find a better way to validate it properly for all cases

database/query/query.go Show resolved Hide resolved
database/query/query.go Show resolved Hide resolved
@ice-ares ice-ares marked this pull request as draft November 27, 2024 15:17
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

Successfully merging this pull request may close these issues.

4 participants