Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
nucleo
Manage
Activity
Members
Labels
Plan
Issues
4
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
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
blockchain
nucleo
Commits
3e39f6cd
Commit
3e39f6cd
authored
6 years ago
by
Robert Martin-Legene
Browse files
Options
Downloads
Patches
Plain Diff
Make sure we have an account
parent
9c5f21b3
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
bin/installbfa.sh
+12
-8
12 additions, 8 deletions
bin/installbfa.sh
bin/start.sh
+23
-17
23 additions, 17 deletions
bin/start.sh
with
35 additions
and
25 deletions
bin/installbfa.sh
+
12
−
8
View file @
3e39f6cd
...
...
@@ -2,6 +2,10 @@
NODEJSPGP
=
0x68576280
# /root often does not have enough space, so we create a directory in /home
# for building, which we hope has more space.
NEW
=
/home/root/new
trap
'exit 1'
ERR
set
-o
errtrace
# Be verbose
...
...
@@ -62,8 +66,8 @@ function golanginstall
if
[
!
-d
/usr/local/go
]
then
info Downloading package of go binaries.
mkdir
-p
~/new
cd
~/new
mkdir
-p
${
NEW
}
cd
${
NEW
}
local arch
=
case
"
$(
uname
-m
)
"
in
x86_64
)
...
...
@@ -105,21 +109,21 @@ function golanginstall
function
gethinstall
{
mkdir
-p
~/new
cd
~/new
mkdir
-p
${
NEW
}
cd
${
NEW
}
info Download geth
source
code.
test
-d
go-ethereum
||
git clone https://github.com/ethereum/go-ethereum
cd
~/new
/go-ethereum
cd
${
NEW
}
/go-ethereum
info Running git pull to ensure that the
local
go-ethereum repo is up-to-date.
git pull
#
cd
~/new
/go-ethereum
cd
${
NEW
}
/go-ethereum
info Compiling geth
make all
&&
echo
Ignore that last line,
if
it tells you to run geth now.
mkdir
-p
~bfa/bin
cp
-vp
~/new
/go-ethereum/build/bin/
{
geth,bootnode,abigen,ethkey,puppeth,rlpdump,wnode,swarm,swarm-smoke
}
~bfa/bin/
cp
-vp
${
NEW
}
/go-ethereum/build/bin/
{
geth,bootnode,abigen,ethkey,puppeth,rlpdump,wnode,swarm,swarm-smoke
}
~bfa/bin/
chown
-R
bfa:bfa ~bfa
}
...
...
@@ -175,7 +179,7 @@ function welcome
# development tools
aptinstall dirmngr apt-transport-https curl git curl build-essential
aptinstall dirmngr apt-transport-https curl git curl build-essential
sudo
usersetup
nodejsinstall
web3install
...
...
This diff is collapsed.
Click to expand it.
bin/start.sh
+
23
−
17
View file @
3e39f6cd
...
...
@@ -3,25 +3,27 @@
if
[
-z
"
${
BFAHOME
}
"
]
;
then
echo
"
\$
BFAHOME not set. Did you source bfa/bin/env ?"
>
&2
;
exit
1
;
fi
source
${
BFAHOME
}
/bin/libbfa.sh
||
exit
1
bootnodeid
=
6c81b38551fec2f1142b58ed65137cc1b7dfdc7b35bc556ef26604c41e30fcdeb12212b3c19913584f71dc7bf87d76cd67fa523e96996c0f148390fb76fdc5f7
bootnodev6
=
2800:40:1:6::135
bootnodev4
=
200.68.65.135
bootnodeport
=
30301
bootnodes
=
"enode://
${
bootnodeid
}
@[
$bootnodev6
]:
${
bootnodeport
}
,enode://
${
bootnodeid
}
@[
$bootnodev4
]:
${
bootnodeport
}
"
bootNICv4
=
"enode://37614dc9f5e94efc45eb533ac02e9f1d693c47f0537d818b222f02e1e6d73cf9@[200.108.146.101]:30301"
bootnodes
=
"
${
bootNICv4
}
"
function
accountlist
{
local
accts
=
for
file
in
${
BFANODEDIR
}
/keystore/
*
--
*
local
filename
for
filename
in
${
BFANODEDIR
}
/keystore/
*
--
*
do
if
[
-r
"
$file
"
]
if
[
-r
"
$file
name
"
-a
${#
filename
}
-ge
40
]
then
acct
=
$
(
echo
$file
|
sed
's/^.*--//'
)
acct
=
$
{
filename
:
$((
${#
filename
}
-
40
))}
accts
=
"
${
accts
}
,
${
acct
}
"
fi
done
# strip first comma
echo
"--password /dev/null --unlock
${
accts
:1
}
"
# strip leading comma
accts
=
${
accts
#,
}
if
[
${#
accts
}
-ge
40
]
then
echo
"--password /dev/null --unlock
${
accts
}
"
fi
}
# touch the "miner" file if you are authorized to mine
...
...
@@ -44,15 +46,19 @@ function getsyncmode
echo
"--syncmode
${
syncmode
}
"
}
test
-n
"
${
BFAACCOUNT
}
"
||
fatal
"No account defined."
if
[
-t
1
]
then
echo
Logging everything to
${
BFANODEDIR
}
/log
echo
Consider running:
tail
-n
1000
-F
${
BFANODEDIR
}
/log
fi
# Start the
miner
.
# Start the
node
.
(
echo
${
BASHPID
}
>
${
BFANODEDIR
}
/start-loop.pid
flock
--nonblock
--exclusive
9
||
exit
1
if
[
-t
1
]
then
echo
Logging everything to
${
BFANODEDIR
}
/log
echo
Consider running:
tail
-n
1000
-F
${
BFANODEDIR
}
/log
fi
while
:
do
echo
...
...
@@ -79,4 +85,4 @@ function getsyncmode
wait
sleep
60
done
2>&1 |
${
BFAHOME
}
/bin/log.sh
${
BFANODEDIR
}
/log &
)
9>>
${
BFANODEDIR
}
/
geth
.pid
)
9>>
${
BFANODEDIR
}
/
start-loop
.pid
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