main: hook up with discovery

@philips We need to modify current discovery to create _config/size key when new the token.
tested on my local machine, works. 
why change it back to int64? if so, it needs to do check on negative value then..