Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
nucleo
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Miguel Montes
nucleo
Commits
8638238f
Commit
8638238f
authored
6 years ago
by
Robert Martin-Legene
Browse files
Options
Downloads
Patches
Plain Diff
Fixing insert/very and documentation
parent
a8b7cda6
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
README.md
+15
-13
15 additions, 13 deletions
README.md
bin/insert.sh
+5
-4
5 additions, 4 deletions
bin/insert.sh
bin/verify.sh
+4
-3
4 additions, 3 deletions
bin/verify.sh
with
24 additions
and
20 deletions
README.md
+
15
−
13
View file @
8638238f
...
@@ -7,17 +7,15 @@
...
@@ -7,17 +7,15 @@
2.
`sudo apt install jq ncurses-bin`
2.
`sudo apt install jq ncurses-bin`
3.
`mkdir ~/bfa`
3.
`mkdir ~/bfa`
4.
`PATH=${PATH}:${HOME}/bfa/bin`
4.
`PATH=${PATH}:${HOME}/bfa/bin`
5.
geth --password /dev/null --datadir $BFANETWORKDIR/node1 account new
5.
run
`start.sh`
6.
geth --datadir $BFANETWORKDIR/node1 init $BFAHOME/src/genesis.json
6.
create your contract (there is already one deployed, so do not confuse the two)
7.
run
`start.sh`
7.
`insert.sh "I'm doing great today."`
8.
create your contract (there is already one deployed, so do not confuse the two)
8.
wait a bit - if you are lucky only 15 seconds
9.
`insert.sh "I'm doing great today."`
9.
`verify.sh TimestampDocument "Hi there"`
10.
wait a bit - if you are lucky 15 seconds only
10.
`verify.sh TimestampDocument "I'm doing great today."`
11.
`verify.sh "Hi there"`
11.
Try the basic
`explorer.sh`
12.
`verify.sh "I'm doing great today."`
12.
consider this crontab: @reboot bfa/network5445/start.sh
13.
Try the basic
`explorer.sh`
13.
Try out walker.pl
14.
consider this crontab: @reboot bfa/network5445/start.sh
15.
Try out walker.pl
## start.sh
## start.sh
requires:
**geth**
requires:
**geth**
...
@@ -32,7 +30,7 @@ Compiles and deploys a contract to the blockchain. A local "node1" must already
...
@@ -32,7 +30,7 @@ Compiles and deploys a contract to the blockchain. A local "node1" must already
Argument 1 is the contract to compile.
Argument 1 is the contract to compile.
Example:
`
./
create.contract src/contract.TimestampDocument.sol`
Example:
`create.contract src/contract.TimestampDocument.sol`
## insert.sh
## insert.sh
requires:
**geth**
requires:
**geth**
...
@@ -51,7 +49,11 @@ Simple script to look at blocks
...
@@ -51,7 +49,11 @@ Simple script to look at blocks
## src/contract.TimestampDocument.sol
## src/contract.TimestampDocument.sol
The initial Timestamp service. Could be made better.
The initial Timestamp service.
## src/contract.TimeStampAuthority.sol
Simpler TSA.
## walker.pl
## walker.pl
requires:
**geth**
,
**perl**
, __(libjson-perl)__
requires:
**geth**
,
**perl**
, __(libjson-perl)__
This diff is collapsed.
Click to expand it.
bin/insert.sh
+
5
−
4
View file @
8638238f
...
@@ -14,16 +14,17 @@ else
...
@@ -14,16 +14,17 @@ else
contract
=
"
$1
"
contract
=
"
$1
"
text
=
"
$2
"
text
=
"
$2
"
fi
fi
if
[
!
-e
"
${
contract
}
"
-a
-r
"
${
BFANETWORKDIR
}
/contracts/
${
contract
}
"
]
prefix
=
"
${
BFANETWORKDIR
}
/contracts"
if
[
!
-e
"
${
contract
}
"
-a
-r
"
${
prefix
}
/
${
contract
}
"
]
then
then
contract
=
${
BFANETWORKDIR
}
/contracts
/
${
contract
}
contract
=
${
prefix
}
/
${
contract
}
fi
fi
test
-L
"
${
contract
}
"
&&
test
-L
"
${
contract
}
"
&&
contract
=
$(
rea
dlink
"
${
contract
}
"
)
contract
=
$(
rea
lpath
"
${
contract
}
"
)
test
-n
"
${
contract
}
"
test
-n
"
${
contract
}
"
basecontract
=
$(
basename
"
${
contract
}
"
)
basecontract
=
$(
basename
"
${
contract
}
"
)
test
-n
"
${
basecontract
}
"
test
-n
"
${
basecontract
}
"
abi
=
$(
cat
${
BFANETWORKDIR
}
/contracts/
${
contract
}
/abi
)
abi
=
$(
cat
${
contract
}
/abi
)
test
-n
"
${
abi
}
"
test
-n
"
${
abi
}
"
test
-n
"
$text
"
||
text
=
"Hello World!"
test
-n
"
$text
"
||
text
=
"Hello World!"
js
=
$(
mktemp
)
js
=
$(
mktemp
)
...
...
This diff is collapsed.
Click to expand it.
bin/verify.sh
+
4
−
3
View file @
8638238f
...
@@ -15,12 +15,13 @@ else
...
@@ -15,12 +15,13 @@ else
contract
=
"
$1
"
contract
=
"
$1
"
text
=
"
$2
"
text
=
"
$2
"
fi
fi
if
[
!
-e
"
${
contract
}
"
-a
-r
"
${
BFANETWORKDIR
}
/contracts/
${
contract
}
"
]
prefix
=
"
${
BFANETWORKDIR
}
/contracts"
if
[
!
-e
"
${
contract
}
"
-a
-r
"
${
prefix
}
/
${
contract
}
"
]
then
then
contract
=
${
BFANETWORKDIR
}
/contracts
/
${
contract
}
contract
=
${
prefix
}
/
${
contract
}
fi
fi
test
-L
"
${
contract
}
"
&&
test
-L
"
${
contract
}
"
&&
contract
=
$(
rea
dlink
"
${
contract
}
"
)
contract
=
$(
rea
lpath
"
${
contract
}
"
)
test
-n
"
${
contract
}
"
test
-n
"
${
contract
}
"
basecontract
=
$(
basename
"
${
contract
}
"
)
basecontract
=
$(
basename
"
${
contract
}
"
)
test
-n
"
${
basecontract
}
"
test
-n
"
${
basecontract
}
"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment