Merge pull request #1379 from majestrate/config-fixes-2020-10-02

fixes for 0.8.0 retag
pull/1381/head
Jason Rhinelander 4 years ago committed by GitHub
commit 53f1601dc4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -36,7 +36,6 @@ namespace llarp
constexpr int DefaultWorkerThreads = 1;
constexpr int DefaultNetThreads = 1;
constexpr bool DefaultBlockBogons = true;
constexpr bool DefaultEnablePeerStats = true;
conf.defineOption<int>("router", "job-queue-size", false, DefaultJobQueueSize, [this](int arg) {
if (arg < 1024)
@ -134,7 +133,7 @@ namespace llarp
"router",
"enable-peer-stats",
false,
DefaultEnablePeerStats,
params.isRelay,
AssignmentAcceptor(m_enablePeerStats));
m_isRelay = params.isRelay;
}
@ -478,7 +477,6 @@ namespace llarp
{
(void)params;
constexpr bool DefaultWhitelistRouters = false;
constexpr auto DefaultLokidRPCAddr = "tcp://127.0.0.1:22023";
conf.defineOption<std::string>(
@ -491,7 +489,7 @@ namespace llarp
});
conf.defineOption<bool>(
"lokid", "enabled", false, DefaultWhitelistRouters, AssignmentAcceptor(whitelistRouters));
"lokid", "enabled", false, params.isRelay, AssignmentAcceptor(whitelistRouters));
conf.defineOption<std::string>("lokid", "jsonrpc", false, "", [](std::string arg) {
if (arg.empty())

@ -18,7 +18,7 @@ namespace llarp
if (m_initialized)
return false;
fs::path root = config.router.m_dataDir;
const fs::path root = config.router.m_dataDir;
// utility function to assign a path, using the specified config parameter if present and
// falling back to root / defaultName if not
@ -31,7 +31,7 @@ namespace llarp
{
fs::path file(option);
if (not file.is_absolute())
throw std::runtime_error(stringify("override for ", defaultName, " cannot be relative"));
file = root / file;
return file;
}

@ -66,7 +66,8 @@ namespace llarp
, m_lokidRpcClient(std::make_shared<rpc::LokidRpcClient>(m_lmq, this))
{
m_keyManager = std::make_shared<KeyManager>();
// for lokid, so we don't close the connection when syncing the whitelist
m_lmq->MAX_MSG_SIZE = -1;
_stopping.store(false);
_running.store(false);
_lastTick = llarp::time_now_ms();
@ -1118,6 +1119,7 @@ namespace llarp
StopLinks();
nodedb()->AsyncFlushToDisk();
_logic->call_later(200ms, std::bind(&Router::AfterStopLinks, this));
m_lmq.reset();
}
void

@ -235,7 +235,7 @@ namespace llarp
try
{
std::string_view buf_view(reinterpret_cast<char*>(buf->cur), buf->sz);
std::string_view buf_view(reinterpret_cast<char*>(buf->cur), buf->size_left());
lokimq::bt_list_consumer btlist(buf_view);
uint64_t outer_version = btlist.consume_integer<uint64_t>();
@ -266,7 +266,6 @@ namespace llarp
bool
RouterContact::DecodeVersion_0(llarp_buffer_t* buf)
{
signed_bt_dict = std::string(reinterpret_cast<char*>(buf->cur), buf->sz);
return bencode_decode_dict(*this, buf);
}

@ -67,8 +67,9 @@ namespace llarp
void
LokidRpcClient::UpdateServiceNodeList()
{
nlohmann::json request;
request["pubkey_ed25519"] = true;
nlohmann::json request, fields;
fields["pubkey_ed25519"] = true;
request["fields"] = fields;
request["active_only"] = true;
if (not m_CurrentBlockHash.empty())
request["poll_block_hash"] = m_CurrentBlockHash;
@ -100,7 +101,7 @@ namespace llarp
void
LokidRpcClient::Connected()
{
constexpr auto PingInterval = 1min;
constexpr auto PingInterval = 30s;
constexpr auto NodeListUpdateInterval = 30s;
auto makePingRequest = [self = shared_from_this()]() {
@ -113,7 +114,6 @@ namespace llarp
},
payload.dump());
};
makePingRequest();
m_lokiMQ->add_timer(makePingRequest, PingInterval);
m_lokiMQ->add_timer(
[self = shared_from_this()]() { self->UpdateServiceNodeList(); }, NodeListUpdateInterval);

@ -62,7 +62,9 @@ Build requirements:
* C++ 17 capable C++ compiler
* libuv >= 1.27.0
* libsodium >= 1.0.18
* gcovr (if generating test coverage with gcc)
* libunbound
* libzmq
* sqlite3
### Linux
@ -71,9 +73,9 @@ build:
$ sudo apt install build-essential cmake git libcap-dev curl libuv1-dev libsodium-dev pkg-config
$ git clone --recursive https://github.com/loki-project/loki-network
$ cd loki-network
$ mkdir build
$ mkdir build
$ cd build
$ cmake ..
$ cmake .. -DBUILD_STATIC_DEPS=ON -DBUILD_SHARED_LIBS=OFF -DSTATIC_LINK=ON
$ make -j$(nproc)
install:
@ -84,14 +86,14 @@ install:
build:
make sure you have cmake, libuv and xcode command line tools installed
$ git clone --recursive https://github.com/loki-project/loki-network
$ cd loki-network
$ mkdir build
$ mkdir build
$ cd build
$ cmake ..
$ cmake .. -DBUILD_STATIC_DEPS=ON -DBUILD_SHARED_LIBS=OFF -DSTATIC_LINK=ON
$ make -j$(nproc)
install:
$ sudo make install
@ -106,16 +108,16 @@ additional build requirements:
* cpack
setup:
$ sudo apt install build-essential cmake git pkg-config mingw-w64 nsis
building:
$ git clone --recursive https://github.com/loki-project/loki-network
$ cd loki-network
$ mkdir build-windows
$ cd build-windows
$ cmake -DNATIVE_BUILD=OFF -DCMAKE_BUILD_TYPE=Release -DBUILD_PACKAGE=ON -DCMAKE_TOOLCHAIN_FILE='../contrib/cross/mingw64.cmake' -DWITH_TESTS=OFF -DCMAKE_CROSSCOMPILING=ON ..
$ cmake -DBUILD_STATIC_DEPS=ON -DNATIVE_BUILD=OFF -DCMAKE_BUILD_TYPE=Release -DBUILD_PACKAGE=ON -DCMAKE_TOOLCHAIN_FILE='../contrib/cross/mingw64.cmake' -DWITH_TESTS=OFF -DCMAKE_CROSSCOMPILING=ON ..
$ cpack -D CPACK_MONOLITHIC_INSTALL=1 -G NSIS ..
### Solaris 2.10+
@ -146,7 +148,7 @@ install:
build:
$ pkg install cmake git curl libuv libsodium pkgconf
$ pkg install cmake git curl libuv libsodium pkgconf libunbound
$ git clone --recursive https://github.com/loki-project/loki-network
$ cd loki-network
$ mkdir build

@ -67,20 +67,25 @@ Requerimientos de compilación:
* GNU Make
* CMake
* Compilador C++ que pueda usar C++ 17
* Compilador C++ que pueda usar C++ 17
* gcovr (para generar la covertura de prueba en gcc)
* libuv >= 1.27.0
* libsodium >= 1.0.18
* libcurl
* libunbound
* libzmq
* sqlite3
### Linux
compilando:
$ sudo apt install build-essential cmake git libcap-dev curl libuv1-dev libsodium-dev
$ git clone https://github.com/loki-project/loki-network
$ sudo apt install build-essential cmake git libcap-dev curl libuv1-dev libsodium-dev pkg-config
$ git clone --recursive https://github.com/loki-project/loki-network
$ cd loki-network
$ make
$ mkdir build
$ cd build
$ cmake .. -DBUILD_STATIC_DEPS=ON -DBUILD_SHARED_LIBS=OFF -DSTATIC_LINK=ON
$ make
instalando:
@ -97,9 +102,12 @@ esto coloca el paquete compilado en `../`
compilando:
este seguro que usted tiene cmake y las herramientas de terminal de xcode ya instaladas
$ git clone https://github.com/loki-project/loki-network
$ cd loki-network
$ mkdir build
$ cd build
$ cmake ..
$ make -j8
instalando:
@ -159,9 +167,12 @@ PENDIENTE: agregar instrucciones para pkgsrc
compilando:
# pkg_add curl cmake git (opcional: ninja ccache)
$ git clone https://github.com/loki-project/loki-network
$ git clone --recursive https://github.com/loki-project/loki-network
$ cd loki-network
$ gmake -j8
$ mkdir build
$ cd build
$ cmake .. -DBUILD_STATIC_DEPS=ON -DBUILD_SHARED_LIBS=OFF -DSTATIC_LINK=ON
$ make
instalando (root):
@ -172,9 +183,12 @@ instalando (root):
compilando:
$ pkg install cmake git curl libuv-1.27.0 libsodium
$ git clone https://github.com/loki-project/loki-network
$ git clone --recursive https://github.com/loki-project/loki-network
$ cd loki-network
$ gmake -j8
$ mkdir build
$ cd build
$ cmake .. -DBUILD_STATIC_DEPS=ON -DBUILD_SHARED_LIBS=OFF -DSTATIC_LINK=ON
$ make
instalando (root):

@ -19,6 +19,7 @@ make_context()
conf.bootstrap.skipBootstrap = true;
conf.api.m_enableRPCServer = false;
conf.router.m_enablePeerStats = true;
conf.lokid.whitelistRouters = false;
conf.router.m_publicAddress = llarp::IpAddress("1.1.1.1");
// make a fake inbound link
conf.links.m_InboundLinks.emplace_back();

Loading…
Cancel
Save