Skip to content
This repository has been archived by the owner on Aug 23, 2020. It is now read-only.

When running getTips on an isolated node an empty array is returned #1615

Open
GalRogozinski opened this issue Sep 12, 2019 · 3 comments
Open
Labels
C-API Component - API T-Bug

Comments

@GalRogozinski
Copy link
Contributor

Bug description

If you run a node that is not receiving any transactions, the tip cache (TipsViewModel) is not populated. so getTips api call will return an empty array.

Not sure whether the solution is to persist tips, or maybe scan for them upon starting IRI.

IRI version

1.8.1

Steps To Reproduce

  1. Run a node in isolation
  2. Call getTips:
curl http://localhost:14265 \
-X POST \
-H 'Content-Type: application/json' \
-H 'X-IOTA-API-Version: 1' \
-d '{"command": "getTips"}'

Expected behaviour

List of tips should be retruned

Actual behaviour

An empty list is returned:
"hashes": [],

@GalRogozinski GalRogozinski added T-Bug C-API Component - API labels Sep 12, 2019
@muXxer
Copy link
Contributor

muXxer commented Sep 12, 2019

Why does it even matter?
If you would persist the tips at shutdown, and spin up your node again... the tips are lazy.

A fullnode has to wait some seconds to receive new tips after startup. Even that makes no sense, because for consensus you need solid tips. So spin up the node and let it sync first.

IMHO the API call "getTips" is an old debug API call. Its just nonsense and confusing. I would remove it and we will not implement it in HORNET.

@jakubcech
Copy link
Contributor

We'll try and figure out if anyone's actually using it for some scenario and if not we can just deprecate it.

@GalRogozinski
Copy link
Contributor Author

According to Discord we should remove it

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
C-API Component - API T-Bug
Projects
None yet
Development

No branches or pull requests

3 participants