Skip to content

Commit ec080b3

Browse files
authored
Merge pull request #25 from kunta-labs/development
Development
2 parents f989548 + 6f7720f commit ec080b3

File tree

65 files changed

+133
-32
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+133
-32
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
save:
2-
git add * ; git commit -am "checkpoint from root" ; git push origin master:development -v
2+
git add * ; git commit -am ${M} ; git push origin master:development -v
33
dbm:
44
time docker build --build-arg nodeType="test" -t aos .

core/.DS_Store

-6 KB
Binary file not shown.

core/Makefile

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -121,13 +121,13 @@ dbb:
121121
dbc:
122122
time docker build --force-rm --rm --network="host" --file "./DockerfileCici" --build-arg nodeType=cici -t cici_node .
123123
rac: # run all containers
124-
docker run -d -p 8081:8081 kuntalabs/africaos:latest ./core node-name="alices node" node-id=1 port=8081 peers=docker.for.mac.host.internal:8082,docker.for.mac.host.internal:8083 ip=docker.for.mac.host.internal:8081
125-
docker run -d -p 8082:8082 kuntalabs/africaos:latest ./core node-name="bob's node" node-id=2 port=8082 peers=docker.for.mac.host.internal:8081,docker.for.mac.host.internal:8083 ip=docker.for.mac.host.internal:8082
126-
docker run -d -p 8083:8083 kuntalabs/africaos:latest ./core node-name="cici's node" node-id=3 port=8083 peers=docker.for.mac.host.internal:8082,docker.for.mac.host.internal:8081 ip=docker.for.mac.host.internal:8083
124+
docker run --log-opt max-size=10m -d -p 8081:8081 kuntalabs/africaos:latest ./core node-name="alices node" node-id=1 port=8081 peers=docker.for.mac.host.internal:8082,docker.for.mac.host.internal:8083 ip=docker.for.mac.host.internal:8081
125+
docker run --log-opt max-size=10m -d -p 8082:8082 kuntalabs/africaos:latest ./core node-name="bob's node" node-id=2 port=8082 peers=docker.for.mac.host.internal:8081,docker.for.mac.host.internal:8083 ip=docker.for.mac.host.internal:8082
126+
docker run --log-opt max-size=10m -d -p 8083:8083 kuntalabs/africaos:latest ./core node-name="cici's node" node-id=3 port=8083 peers=docker.for.mac.host.internal:8082,docker.for.mac.host.internal:8081 ip=docker.for.mac.host.internal:8083
127127
racl: # run all containers local
128-
docker run -d -p 8081:8081 aos:latest ./core node-name="alices node" node-id=1 port=8081 peers=docker.for.mac.host.internal:8082,docker.for.mac.host.internal:8083 ip=docker.for.mac.host.internal:8081
129-
docker run -d -p 8082:8082 aos:latest ./core node-name="bob's node" node-id=2 port=8082 peers=docker.for.mac.host.internal:8081,docker.for.mac.host.internal:8083 ip=docker.for.mac.host.internal:8082
130-
docker run -d -p 8083:8083 aos:latest ./core node-name="cici's node" node-id=3 port=8083 peers=docker.for.mac.host.internal:8082,docker.for.mac.host.internal:8081 ip=docker.for.mac.host.internal:8083
128+
docker run --log-opt max-size=5m --log-opt max-file=10 -d -p 8081:8081 aos:latest ./core node-name="alices node" node-id=1 port=8081 peers=docker.for.mac.host.internal:8082,docker.for.mac.host.internal:8083 ip=docker.for.mac.host.internal:8081
129+
docker run --log-opt max-size=5m --log-opt max-file=10 -d -p 8082:8082 aos:latest ./core node-name="bob's node" node-id=2 port=8082 peers=docker.for.mac.host.internal:8081,docker.for.mac.host.internal:8083 ip=docker.for.mac.host.internal:8082
130+
docker run --log-opt max-size=5m --log-opt max-file=10 -d -p 8083:8083 aos:latest ./core node-name="cici's node" node-id=3 port=8083 peers=docker.for.mac.host.internal:8082,docker.for.mac.host.internal:8081 ip=docker.for.mac.host.internal:8083
131131
stress_aws:
132132
while true; do make stress_a_aws; sleep 60 ; make stress_b_aws; sleep 60 ; make stress_c_aws; sleep 60 ; done
133133
stress_a_aws:
@@ -137,6 +137,6 @@ stress_b_aws:
137137
stress_c_aws:
138138
curl -d 'TESTSTRING' --header "Origin: ${CICI}:8083" --header "User-Agent: 100,200,test_string" ${CICI}:8083/transaction/submit/output ;
139139
aws_docker_commands:
140-
echo "docker run -d -p 8081:8081 kuntalabs/africaos:latest ./core node-name='alices node' node-id=1 port=8081 peers=${BOB}:8082,${CICI}:8083 ip=${ALICE}:8081"
141-
echo "docker run -d -p 8082:8082 kuntalabs/africaos:latest ./core node-name='bobs node' node-id=2 port=8082 peers=${ALICE}:8081,${CICI}:8083 ip=${BOB}:8082"
142-
echo "docker run -d -p 8083:8083 kuntalabs/africaos:latest ./core node-name='cicis node' node-id=3 port=8083 peers=${BOB}:8082, ${ALICE}:8081 ip=${CICI}:8083"
140+
echo "docker run --log-opt max-size=5m --log-opt max-file=10 -d -p 8081:8081 kuntalabs/africaos:latest ./core node-name='alices node' node-id=1 port=8081 peers=${BOB}:8082,${CICI}:8083 ip=${ALICE}:8081"
141+
echo "docker run --log-opt max-size=5m --log-opt max-file=10 -d -p 8082:8082 kuntalabs/africaos:latest ./core node-name='bobs node' node-id=2 port=8082 peers=${ALICE}:8081,${CICI}:8083 ip=${BOB}:8082"
142+
echo "docker run --log-opt max-size=5m --log-opt max-file=10 -d -p 8083:8083 kuntalabs/africaos:latest ./core node-name='cicis node' node-id=3 port=8083 peers=${BOB}:8082,${ALICE}:8081 ip=${CICI}:8083"

core/macros/src/lib.rs

Lines changed: 41 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,6 @@ extern crate json;
1818

1919
use json::{JsonValue};
2020

21-
macro_rules! transaction_input_logic {
22-
() => {
23-
24-
}
25-
}
26-
2721
macro_rules! block_validation {
2822
() => {
2923
}
@@ -34,6 +28,10 @@ macro_rules! proposal_validation {
3428
}
3529
}
3630

31+
/*
32+
@name proposal_creator_election
33+
@description
34+
*/
3735
#[macro_export]
3836
macro_rules! proposal_creator_election {
3937
// TODO: place PCE code in here
@@ -44,7 +42,20 @@ macro_rules! proposal_creator_election {
4442
}
4543
}
4644

47-
// @input
45+
/*
46+
@name transaction_input_logic
47+
@description
48+
*/
49+
macro_rules! transaction_input_logic {
50+
() => {
51+
52+
}
53+
}
54+
55+
/*
56+
@name transaction_output_logic
57+
@description
58+
*/
4859
#[macro_export]
4960
macro_rules! transaction_output_logic {
5061
/*
@@ -84,18 +95,35 @@ mod tests {
8495

8596
#[test]
8697
fn test_transaction_output_logic() -> (){
87-
let test_json: JsonValue = object!{
98+
let test_state_json: JsonValue = object!{
8899
"test" => "test"
89100
};
90101

91102
let test_json_2: JsonValue = object!{
92103
"test" => "test",
93-
"test2" => "test2"
104+
"HASHTEST" => "100,200,test_string"
94105
};
95-
let test_string: String = String::from("test2");
96-
let result: JsonValue = transaction_output_logic!( test_json.clone(),
97-
test_string,
98-
test_string );
106+
let test_hash_string: String = String::from("HASHTEST");
107+
let test_tx_data_string: String = String::from("100,200,test_string");
108+
let result: JsonValue = transaction_output_logic!( test_state_json.clone(),
109+
test_hash_string,
110+
test_tx_data_string );
99111
assert_eq!(test_json_2, result);
100112
}
113+
114+
#[test]
115+
fn test_transaction_input_logic() -> (){
116+
let test_state_json: JsonValue = object!{
117+
"test" => "test"
118+
};
119+
120+
let test_json_2: JsonValue = object!{
121+
"test" => "test",
122+
"HASHTEST" => "100,200,test_string"
123+
};
124+
let test_hash_string: String = String::from("HASHTEST");
125+
let test_tx_data_string: String = String::from("100,200,test_string");
126+
127+
128+
}
101129
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"rustc_fingerprint":17622156588637685949,"outputs":{"7418947162089833526":["___\nlib___.rlib\nlib___.dylib\nlib___.dylib\nlib___.a\nlib___.dylib\n/Users/jovonnipharr/.rustup/toolchains/stable-x86_64-apple-darwin\ndebug_assertions\nproc_macro\ntarget_arch=\"x86_64\"\ntarget_endian=\"little\"\ntarget_env=\"\"\ntarget_family=\"unix\"\ntarget_feature=\"fxsr\"\ntarget_feature=\"sse\"\ntarget_feature=\"sse2\"\ntarget_feature=\"sse3\"\ntarget_feature=\"ssse3\"\ntarget_os=\"macos\"\ntarget_pointer_width=\"64\"\ntarget_vendor=\"apple\"\nunix\n",""],"4476964694761187371":["___\nlib___.rlib\nlib___.dylib\nlib___.dylib\nlib___.a\nlib___.dylib\n/Users/jovonnipharr/.rustup/toolchains/stable-x86_64-apple-darwin\ndebug_assertions\nproc_macro\ntarget_arch=\"x86_64\"\ntarget_endian=\"little\"\ntarget_env=\"\"\ntarget_family=\"unix\"\ntarget_feature=\"fxsr\"\ntarget_feature=\"sse\"\ntarget_feature=\"sse2\"\ntarget_feature=\"sse3\"\ntarget_feature=\"ssse3\"\ntarget_os=\"macos\"\ntarget_pointer_width=\"64\"\ntarget_vendor=\"apple\"\nunix\n",""],"1164083562126845933":["rustc 1.36.0 (a53f9df32 2019-07-03)\nbinary: rustc\ncommit-hash: a53f9df32fbb0b5f4382caaad8f1a46f36ea887c\ncommit-date: 2019-07-03\nhost: x86_64-apple-darwin\nrelease: 1.36.0\nLLVM version: 8.0\n",""]},"successes":{}}

core/macros/target/debug/.cargo-lock

Whitespace-only changes.
210 Bytes
Binary file not shown.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
This file has an mtime of when this was started.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
dd85e8bbeadef55b
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"rustc":18183863943228103741,"features":"[]","target":3699434546522289928,"profile":9935990280773120926,"path":5785547077421505497,"deps":[],"local":[{"Precalculated":"0.12.1"}],"rustflags":[],"metadata":6678033801590456021}

0 commit comments

Comments
 (0)