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

Running issue #9

Open
konsvoulg opened this issue Nov 1, 2023 · 11 comments
Open

Running issue #9

konsvoulg opened this issue Nov 1, 2023 · 11 comments

Comments

@konsvoulg
Copy link

Hello, and sorry for the beginner question since it's the first time I am working with such components. Based on the instructions, I edited the .yml file and configured the parameters in the node's .env file with the tag I wanted. I haven't figured out how to pull the desired block yet, but the log of the collector on the console was stuck on "Running Listener...." so I assume it was working? However, sometime later, the console printed the following error:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x28 pc=0xc1c5d8]

goroutine 67 [running]:
collector/pkg/listener.GetTaggedDataFromId(0x400018c7d0?, {0x10701e8?, 0x400018d810?}, {0x1060c38?, 0x400027ed00})
/scratch/pkg/listener/gets.go:28 +0xa8
collector/pkg/listener.(*Listener).Run(0x40004ccb58, {0x10701e8, 0x400018d810}, {0x1060c38?, 0x400027ed00})
/scratch/pkg/listener/listener.go:66 +0x158
collector/pkg/collector.(*Collector).Run(0x40004ccb40, {0x1060c38, 0x400027ed00})
/scratch/pkg/collector/collector.go:88 +0x418
collector/core/collector.run.func1.1()
/scratch/core/collector/component.go:96 +0x30
created by collector/core/collector.run.func1
/scratch/core/collector/component.go:95 +0xb8

@Giordyfish
Copy link
Member

Hello, can you share your inx-collector's section of the docker_compose.yml file and your .env file please? (remove any sensible information first)

@konsvoulg
Copy link
Author

Sure thing! Here are two txt files with each section
.yml_content.txt
.env_content.txt

@Giordyfish
Copy link
Member

Giordyfish commented Nov 2, 2023

What is the tag you are subscribing to? The one in the .env file.

@konsvoulg
Copy link
Author

That's the one: 0x31393935

@Giordyfish
Copy link
Member

I cannot replicate your seg fault, everything works for me. I'm running my test on an arm64 device. Can you give me more info about your hornet node deployment?

I can tell you are using a hex-encoded string for the tag. At this moment the plugin supports the utf8 representation of the tag's bytes, which would be "1995" in your case. Hex-encoded strings for the tag will be the object of a future release. If you want to be sure that you are pointing to the correct tag, you should use the utf8 encoding as of now.

@konsvoulg
Copy link
Author

konsvoulg commented Nov 2, 2023

I think it works now. Changed the hex code to 1995. I published two data blocks with the respective tag and the console printed that it had uploaded them to the bucket. Thank you!

As of my node I just used the default instructions from IOTA. Specifically the https setup. I published the domain through Cloudflare to avoid port forwarding.

Are there any step-by-step instructions on how to access or interact with the stored blocks once the collector detects and stores them? Because the code I use to interact with IOTA and the node as a user is not on the same device that operates the node.

@Giordyfish
Copy link
Member

Giordyfish commented Nov 3, 2023

The are INX-style REST APIs, for that. They are documented in last section of the INSTRUCTIONS.md file (there is a link to swagger). However, they may not work for you at the moment, as I noticed that some dependencies are outdated. I will get back to you when I finish the next release, and I will provide easier step-by-step instruction about how to interact with the APIs. In the meantime, if you used minio or any other S3 storage, you could use its REST APIs to retrieve your blocks.

@konsvoulg
Copy link
Author

konsvoulg commented Nov 3, 2023

Cool I'll wait for the next release and examples, then. Thank you!

@konsvoulg
Copy link
Author

Sorry to disturb you again, just a quick question because I'm using the plugin for my PhD project. With the updated release and REST API, will we be able to retrieve the blocks based on their tag and not the block ID? It's more practical and efficient than using additional code to retrieve them through the minio REST APIs.

@Giordyfish
Copy link
Member

Giordyfish commented Nov 3, 2023

A tag is not a unique identifier of a block: anyone can publish a block on a specific tag, and you can have multiple blocks with the same tag. When REST APIs get updated you can expect them to work as stated in the swagger documentation. Any mechanism that uses tags to retrieve blocks would require additional parameters, otherwise, it could return multiple blocks.

If you want to better explain your use case to me, I might be able to help you further, just contact me as specified by the contacts section of the readme.

I will update and close this issue when the APIs get updated.

@konsvoulg
Copy link
Author

Will do. Thank you again!

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

No branches or pull requests

2 participants