Skip to content

Commit

Permalink
Added snarktor-receiver-contract updated
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcoOl94 committed Jul 31, 2024
1 parent f214c9f commit f37b26f
Show file tree
Hide file tree
Showing 5 changed files with 85 additions and 2 deletions.
7 changes: 6 additions & 1 deletion config.ini
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,18 @@ p2p-listen-endpoint = 0.0.0.0:9876
wasm-runtime = eos-vm
eos-vm-oc-enable = all

#chain-state-db-size-mb = 65536
chain-state-db-size-mb = 65536
contracts-console = true
access-control-allow-origin = *
access-control-allow-headers = *
verbose-http-errors = true
http-validate-host = false
abi-serializer-max-time-ms = 100
http-max-response-time-ms = 50
enable-account-queries = true
trace-history = true
chain-state-history = true
transaction-finality-status-max-storage-size-gb = 10

# PLUGINS
plugin = eosio::http_plugin
Expand All @@ -27,3 +31,4 @@ plugin = eosio::net_plugin
plugin = eosio::producer_plugin
plugin = eosio::net_api_plugin
plugin = eosio::producer_api_plugin
plugin = eosio::state_history_plugin
69 changes: 69 additions & 0 deletions contracts/snarktor/snarktor_receiver_contract.abi
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
{
"version": "eosio::abi/1.1",
"types": [],
"structs": [
{
"name": "Proof",
"base": "",
"fields": [
{
"name": "proof_id",
"type": "uint64"
},
{
"name": "proof_digest",
"type": "checksum256"
},
{
"name": "proof_input",
"type": "uint64[]"
}
]
},
{
"name": "clearproof",
"base": "",
"fields": [
{
"name": "proof_id",
"type": "uint64"
}
]
},
{
"name": "submit",
"base": "",
"fields": [
{
"name": "proof_bytes",
"type": "bytes"
}
]
}
],
"actions": [
{
"name": "clearproof",
"type": "clearproof",
"ricardian_contract": ""
},
{
"name": "submit",
"type": "submit",
"ricardian_contract": ""
}
],
"tables": [
{
"name": "proofs",
"type": "Proof",
"index_type": "i64",
"key_names": [],
"key_types": []
}
],
"variants": [],
"abi_extensions": [],
"error_messages": [],
"ricardian_clauses": []
}
Binary file not shown.
2 changes: 1 addition & 1 deletion genesis.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"net_usage_leeway": 500,
"context_free_discount_net_usage_num": 20,
"context_free_discount_net_usage_den": 100,
"max_block_cpu_usage": 5000000,
"max_block_cpu_usage": 4000000,
"target_block_cpu_usage_pct": 1000,
"max_transaction_cpu_usage": 450000,
"min_transaction_cpu_usage": 100,
Expand Down
9 changes: 9 additions & 0 deletions setup_network.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ NODEOS_PID=$!

sleep 10

cleos -u http://127.0.0.1:8888 get info

cleos wallet unlock -n devnet --password "PW5Hxdf5mWNSxoWH5UdxPdv9LcsR2hEUFxn1CjLp1NvizzCZ4Cr5i"

cleos create account eosio eosio.token EOS5uHeBsURAT6bBXNtvwKtWaiDSDJSdSmc96rHVws5M1qqVCkAm6 EOS5uHeBsURAT6bBXNtvwKtWaiDSDJSdSmc96rHVws5M1qqVCkAm6
Expand All @@ -22,6 +24,7 @@ cleos create account eosio eosio.ramfee EOS5uHeBsURAT6bBXNtvwKtWaiDSDJSdSmc96rHV
cleos create account eosio eosio.rex EOS5uHeBsURAT6bBXNtvwKtWaiDSDJSdSmc96rHVws5M1qqVCkAm6 EOS5uHeBsURAT6bBXNtvwKtWaiDSDJSdSmc96rHVws5M1qqVCkAm6
cleos create account eosio eosio.saving EOS5uHeBsURAT6bBXNtvwKtWaiDSDJSdSmc96rHVws5M1qqVCkAm6 EOS5uHeBsURAT6bBXNtvwKtWaiDSDJSdSmc96rHVws5M1qqVCkAm6
cleos create account eosio eosio.stake EOS5uHeBsURAT6bBXNtvwKtWaiDSDJSdSmc96rHVws5M1qqVCkAm6 EOS5uHeBsURAT6bBXNtvwKtWaiDSDJSdSmc96rHVws5M1qqVCkAm6
cleos create account eosio eosio.snark EOS5uHeBsURAT6bBXNtvwKtWaiDSDJSdSmc96rHVws5M1qqVCkAm6 EOS5uHeBsURAT6bBXNtvwKtWaiDSDJSdSmc96rHVws5M1qqVCkAm6

curl -X POST http://127.0.0.1:8888/v1/producer/schedule_protocol_feature_activations -d '{"protocol_features_to_activate": ["0ec7e080177b2c02b278d5088611686b49d739925a92d9bfcacd7fc6b74053bd"]}' | jq

Expand Down Expand Up @@ -54,5 +57,11 @@ cd $OG_DIR
cleos push action eosio init '[0,"4,TLOS"]' -p eosio@active
sleep 6

cd contracts/snarktor
cleos set contract eosio.snark . ./snarktor_receiver_contract.wasm ./snarktor_receiver_contract.abi
cd $OG_DIR

sleep 5

kill $NODEOS_PID
sleep 10

0 comments on commit f37b26f

Please sign in to comment.