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

Auto rep migration support #599

Merged
merged 4 commits into from Apr 4, 2018

Conversation

Projects
None yet
2 participants
@nuevoalex
Copy link
Member

commented Apr 3, 2018

When a genesis universe is created it will assume the legacy REP contract is frozen and until all balances are migrated it will be frozen except in migrating balances and allowances.

I added a test net rep contract that we can use so we still have faucet capabilities on test nets.

this.universe = await this.createGenesisUniverse();

if (!this.configuration.isProduction) {
this.migrateFromlegacyRep();

This comment has been minimized.

Copy link
@adrake33

adrake33 Apr 3, 2018

Member

I'm not sure I understand how this is intended to work on production. I thought the idea was that holders of legacy REP would all be migrated to regular REP automatically. How will this be done?

This comment has been minimized.

Copy link
@nuevoalex

nuevoalex Apr 3, 2018

Author Member

In a non production environment there is only one Legacy REP holder, the deployer of the contracts. See the part right above thise where in a non production environment we mint 11 million Legacy REP for the default address

This comment has been minimized.

Copy link
@adrake33

adrake33 Apr 3, 2018

Member

Right, but isn't the intent to auto-migrate legacy REP users on production? Will they have to call migrateBalancesFromLegacyRep and migrateAllowancesFromLegacyRep manually, or how will these be called on production? Just trying to make sure I understand the intended behavior.

This comment has been minimized.

Copy link
@nuevoalex

nuevoalex Apr 3, 2018

Author Member

These won't be called in production. The reason we're calling them in dev is so that everything is ready to go for development and on testnets. In production we'll need to run a script that migrates balances and allowances before the system functions

This comment has been minimized.

Copy link
@adrake33

adrake33 Apr 3, 2018

Member

Ok, gotcha. That's the part I was trying to clarify.

return universe;
}

private async migrateFromlegacyRep(): Promise<void> {

This comment has been minimized.

Copy link
@adrake33

adrake33 Apr 3, 2018

Member

Nit: shouldn't the 'l' in migrateFromlegacyRep be capitalized here?

This comment has been minimized.

Copy link
@nuevoalex

nuevoalex Apr 3, 2018

Author Member

Will fix!

@adrake33
Copy link
Member

left a comment

Looks good to me, but I think we should wait for @MicahZoltu to review as well before merging.

@adrake33 adrake33 merged commit 596f7d2 into master Apr 4, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@adrake33 adrake33 deleted the auto_rep_migration_support branch Apr 4, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.