-
Notifications
You must be signed in to change notification settings - Fork 128
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
gov: Restructure decred's Agendas and Proposals governance implementations #1016
Conversation
This is great @dmigwi . I've been looking forward to seeing Politeia data incorporated. This is important information that demonstrates one of Decred's strongest features. A couple of suggestions from the first impression.
|
Great Notes @buck54321;
|
Proposal items should likely be imported by oldest first so that the order stays consistent on subsequent syncs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I find "onchaindb" and "offchaindb" to be too vague and imprecise (on-chain what?). I'd prefer to see the following packages in the repo folder:
gov/agendas
orgov/deployments
- For the various deployment agendas that are directly voted upon with the vote bits in vote transactions.gov/proposals
orgov/politeia
- For the Politeia proposals and the voting that is coordinated by the Politeia server and anchored on the blockchain.
Further, the "offchaindb" package is much more than just a DB. It includes types and a client for communicating with Politeia. These things are useful on their own. Thinking about maximizing the utility and reusability of the code, it's best to split things further (one possibility: gov/politeia/agendadb
, gov/politeia/types
gov/politeia/piclient
.
1176036
to
0ee898d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for making those architecture changes! I think it is much more versatile this way.
Just some minor edits requested. Ready to remove WIP?
I've some extra minor features to add (proposals pagination and a legend for the various |
Latest Change:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we add Politeia data endpoints to DCRData API?
We will need to polish the layout. Do you want to work through it here or do it separately?
d4ea508
to
96c4008
Compare
@dmigwi Tentatively approved, although needs a rebase/resolve, and a final test on my part. |
(and approval by @buck54321) |
I am rebasing this PR. |
Do not update existing proposals with status not authorized
96c4008
to
95cad29
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one last thing I'm not certain about.
@buck54321 I am not sure of what the said test for |
Expected
Actual
|
for for |
@buck54321 Here is why trying to reverse this |
All addresses need the protocol. https://play.golang.org/p/DRVTc3efkdb We certainly want to support connecting by IP:Port, but I suppose adding the protocol is just required then. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I realized that there's one show-stopper. dcrdata has to work when Politeia is inaccessible. TBH, I think dcrdata should have a no-Politeia option, but we can get to that if needed.
2c48443
to
59474f1
Compare
Don't forget to right-align numerical columns :) |
…#6) - Each AgendaTagged is not small in the []AgendaTagged in agendasForVoteVersion, so allocate enough space for all agendas before appending them in the loop. - Also add Timeout to the http.Client as this is distinct from the http.Transport's IdleConnTimeout.
|
@chappjc 👆 |
This introduces two pages under
/proposals
and/propasal/{id}
url paths. The proposals data is sourced from politeia's API endpoints and stored in the storm db as the other high level on-chain agenda detailsProposal Page
Proposals Page