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

Configuration INI trailing spaces - regression #1021

Closed
alon-e opened this issue Sep 27, 2018 · 1 comment
Closed

Configuration INI trailing spaces - regression #1021

alon-e opened this issue Sep 27, 2018 · 1 comment
Labels
C-Configuration Component - Configuration L-Known Issues Known issues that should be in the release notes. T-Bug

Comments

@alon-e
Copy link
Contributor

alon-e commented Sep 27, 2018

Bug description

In current dev c3087ae setting a Coo with trailing spaces will result in an unclear exception:

Exception in thread "main" java.lang.IllegalArgumentException: Destination array is not large enough.
	at com.iota.iri.utils.Converter.trits(Converter.java:93)
	at com.iota.iri.model.HashFactory.create(HashFactory.java:48)
	at com.iota.iri.MilestoneTracker.<init>(MilestoneTracker.java:72)
	at com.iota.iri.Iota.<init>(Iota.java:56)
	at com.iota.iri.IRI$IRILauncher.main(IRI.java:69)
	at com.iota.iri.IRI.main(IRI.java:31)

This does not happen in v1.5.4 (latest release at the time) so it is either related to #969 or #724

if related to Conf rework then it's worth looking at other places where this might happen in the INI file.
this can be set to wont-fix, but then it should be mentioned in the release notes as a known issue.

Steps To Reproduce

  1. set iota.iri to:
[IRI]
ZMQ_ENABLED = TRUE
TESTNET = TRUE
MWM = 9
SNAPSHOT_FILE = conf/snapshot.txt
COORDINATOR = NPCRMHDOMU9QHFFBKFCWFHFJNNQDRNDOGVPEVDVGWKHFUFEXLWJBHXDJFKQGYFRDZBQIFDSJMUCCQVICI 
MILESTONE_START_INDEX = 2
KEYS_IN_MILESTONE = 10
MAX_DEPTH = 1000
  1. run IRI on that commit.
  2. it will fail with the aformentioned Exception.

Expected behaviour

Not sure, but I would expect trailing spaces to be trimmed.

Actual behaviour

Unclear exit

Errors

Posted above.

@cyclux
Copy link

cyclux commented Oct 3, 2018

Similar exception happens in case of unknown characters or format within the NEIGHBORS parameter. #1024 might already fix this as well though.

@jakubcech jakubcech added the L-Known Issues Known issues that should be in the release notes. label Oct 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
C-Configuration Component - Configuration L-Known Issues Known issues that should be in the release notes. T-Bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants