I'm just about done with the final round of testing for decred/politeia#1632. Now that the legacy proposals will be included in the tstore backend and returned from the API like any other proposal, we'll need to differentiate between legacy git proposals and normal tstore proposals in the gui.
The gui can tell that a proposal is a legacy proposal by inspecting the legacytoken field of the proposalmetadata.json proposal file. This field will be populated with the git repo token for the proposal if the proposal is a legacy proposal. This is the only place in the proposal data that will reference the proposal's git token. All other token fields will reference the proposal's tstore token. These are not the same. The tstore token is created during the import process and matches the token format of the other tstore proposals.
The gui changes that I was thinking should be made include:
Have some kind of indicator that tells the user that this is a legacy proposal and explain what that means.
One of the downsides of importing the legacy proposals into the tstore backend was that it breaks the proposal signatures. For this reason, all of the signature fields have been left empty. The git repo will serve as the source of truth for the original legacy proposal data and their sigantures, so we'll want to provide a link in the gui to this data.
Please let me know if you encounter any issues or find anything that looks off with the legacy proposals. I've done quite a bit of testing and I think I've squashed all of the bugs, but a second set of eyes never hurts.
Importing legacy data locally
The full import process takes 7.5 hours, so I've put together a script that you can run that only imports a handful of the legacy proposals. This should be run in the same directory as the mainnet git repo after you've installed the legacypoliteia CLI tool. You do not need to have politeiad or politeiawww running. You do need to have the tlog server, tlog signer, and MySQL database running.
Once the data has been imported, politeiad must be reset using the --fsck flag so that the caches are rebuilt to include the newly imported data.
Note, this is mainnet data and will be imported into the mainnet databases. Make sure you are running politeiad and politeiawww against mainnet, not testnet, when you turn them on.
I'm just about done with the final round of testing for decred/politeia#1632. Now that the legacy proposals will be included in the tstore backend and returned from the API like any other proposal, we'll need to differentiate between legacy git proposals and normal tstore proposals in the gui.
The gui can tell that a proposal is a legacy proposal by inspecting the
legacytoken
field of theproposalmetadata.json
proposal file. This field will be populated with the git repo token for the proposal if the proposal is a legacy proposal. This is the only place in the proposal data that will reference the proposal's git token. All other token fields will reference the proposal's tstore token. These are not the same. The tstore token is created during the import process and matches the token format of the other tstore proposals.The gui changes that I was thinking should be made include:
Have some kind of indicator that tells the user that this is a legacy proposal and explain what that means.
One of the downsides of importing the legacy proposals into the tstore backend was that it breaks the proposal signatures. For this reason, all of the signature fields have been left empty. The git repo will serve as the source of truth for the original legacy proposal data and their sigantures, so we'll want to provide a link in the gui to this data.
Please let me know if you encounter any issues or find anything that looks off with the legacy proposals. I've done quite a bit of testing and I think I've squashed all of the bugs, but a second set of eyes never hurts.
Importing legacy data locally
The full import process takes 7.5 hours, so I've put together a script that you can run that only imports a handful of the legacy proposals. This should be run in the same directory as the
mainnet
git repo after you've installed thelegacypoliteia
CLI tool. You do not need to have politeiad or politeiawww running. You do need to have the tlog server, tlog signer, and MySQL database running.Once the data has been imported, politeiad must be reset using the --fsck flag so that the caches are rebuilt to include the newly imported data.
Note, this is mainnet data and will be imported into the mainnet databases. Make sure you are running politeiad and politeiawww against mainnet, not testnet, when you turn them on.