Skip to content

Commit

Permalink
Restore Cache
Browse files Browse the repository at this point in the history
  • Loading branch information
harrysolovay committed Sep 12, 2024
1 parent 80b3a2c commit 195ddfa
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 10 deletions.
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@ On-Chain Voting is a protocol developed to help with governing the Mina L1 block

1. Ensure you're on the correct network (in this case devnet).
2. Click on your address to copy it to the clipboard (we'll be using it in the next step).

> Note: you must use an account which exists in the accounts ledger for the previous epoch. If you
> create and utilize a brand new account, your vote will not be counted.
3. Click on "Send."

![Ouro Home](./ouro_screens/1.home.png)
Expand Down
2 changes: 1 addition & 1 deletion server/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion server/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "mina-ocv-server"
version = "0.7.0"
version = "0.8.0"
edition = "2021"

[dependencies]
Expand Down
15 changes: 15 additions & 0 deletions server/migrations/2023-08-20-211633_add_initial_schema/up.sql
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,18 @@ VALUES (
'Devnet Testing Description',
'https://github.com/MinaProtocol/MIPs/blob/main/MIPS/mip-zkapps.md'
);
INSERT INTO mina_proposals
VALUES (
7,
'MIP52',
1726170486000,
1726789686000,
73,
'jwUfRQindewPk7Uep8z3YUjMvQKaq6drpKvJRTq47wGU6Dxkhqx',
'Core',
'V2',
'Devnet Testing Title',
'Devnet Testing Description',
'https://github.com/MinaProtocol/MIPs/blob/main/MIPS/mip-zkapps.md'
);

10 changes: 7 additions & 3 deletions server/src/database/cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,15 @@ pub(crate) struct CacheManager {
impl CacheManager {
pub(crate) fn build() -> CacheManager {
CacheManager {
votes: VotesCache::builder().time_to_live(std::time::Duration::ZERO).build(),
votes: VotesCache::builder()
.time_to_live(std::time::Duration::from_secs(60 * 5))
.build(),
votes_weighted: VotesWeightedCache::builder()
.time_to_live(std::time::Duration::ZERO)
.time_to_live(std::time::Duration::from_secs(60 * 5))
.build(),
ledger: LedgerCache::builder()
.time_to_live(std::time::Duration::from_secs(60 * 60 * 12))
.build(),
ledger: LedgerCache::builder().time_to_live(std::time::Duration::ZERO).build(),
}
}
}
1 change: 1 addition & 0 deletions server/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ pub(crate) const MINA_GOVERNANCE_SERVER: &str = "mina_governance_server";

#[tokio::main]
async fn main() -> Result<()> {
println!("Let's see!");
config::init_tracing();

let config = Config::parse();
Expand Down
2 changes: 1 addition & 1 deletion web/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mina-ocv-web",
"version": "0.7.0",
"version": "0.8.0",
"private": true,
"engines": {
"node": ">=18.0.0",
Expand Down

0 comments on commit 195ddfa

Please sign in to comment.