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

Allow numbers in asset symbols #620

Closed
mutagenfork opened this issue Feb 1, 2018 · 6 comments
Closed

Allow numbers in asset symbols #620

mutagenfork opened this issue Feb 1, 2018 · 6 comments

Comments

@mutagenfork
Copy link

Right now, numbers aren't allowed in asset symbols. It would be handy if it were possible to use numbers, so that symbols like "SP500" were possible.

@oxarbitrage
Copy link
Member

by the code it seems the numbers are possible but not at the start or end of the asset symbol:

if( !isalpha( symbol.front() ) )
return false;
if( !isalpha( symbol.back() ) )
return false;

not totally sure but i think you have a good point and at least we should allow the last character to use isalnum

@oxarbitrage
Copy link
Member

i am taking this one as it is the easier HF available and i want to get more familiar with the process to make a few more for the next consensus.

@oxarbitrage
Copy link
Member

question here. asset_ops.cpp does not haves access to database so compare the hardfork date against head_block_time is not possible. i saw in other files of the protocol directory that what they did is use fc::time_point::now() to compare. this is ok but it will make test cases not possible. other option is to add database support to the file. any advice on how to proceed is appreciated.

@abitmore
Copy link
Member

fc::time_point::now() is a no-go, since it may break consensus. To make the change, need to loose the validation code in asset_ops.cpp, add a hard fork guard code with original rule to asset_evaluator to make sure no rule change before the hard fork, add corresponding hard fork guard code in proposal_evaluator. After hard fork, those hard fork guard code can be safely removed.

By the way this hard fork may need a BSIP and need to be approved by stake holders. It will enable more asset names, thus related to economy.

@abitmore abitmore added this to the Future Consensus-Changing Release milestone Feb 12, 2018
@oxarbitrage
Copy link
Member

oxarbitrage commented Feb 12, 2018

i see, thanks for the response. it is more complicated than i expected even if the explication on how to do it is pretty clear. as it need BSIP i think i will just leave it for another consensus release, i dont see much interest for this anyways.

@abitmore abitmore modified the milestones: Future Consensus-Changing Release, 201805 - Consensus Changing Release Mar 18, 2018
@abitmore
Copy link
Member

Done with #705, merged into hardfork branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants