fixed underflow in logger and updated test runner xml

This commit is contained in:
loki
2023-06-29 15:06:06 +01:00
parent 200153cb3c
commit 5a4f2aaeb4
7 changed files with 817 additions and 34 deletions

View File

@@ -1,8 +1,8 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="go test local loki" type="GoTestRunConfiguration" factoryName="Go Test">
<configuration default="false" name="test pkg local" type="GoTestRunConfiguration" factoryName="Go Test" singleton="false">
<module name="indra" />
<working_directory value="$PROJECT_DIR$/pkg" />
<go_parameters value="-v ./... -tags local -gcflags &quot;all=-trimpath=$PROJECT_DIR$&quot;" />
<go_parameters value="-v ./... -tags local -gcflags &quot;all=-trimpath=$ContentRoot$&quot;" />
<root_directory value="$PROJECT_DIR$" />
<kind value="DIRECTORY" />
<package value="git-indra.lan/indra-labs/indra/pkg/engine" />

View File

@@ -2,7 +2,7 @@
<configuration default="false" name="go test local CI" type="GoTestRunConfiguration" factoryName="Go Test">
<module name="indra" />
<working_directory value="$PROJECT_DIR$/pkg" />
<go_parameters value="-v ./... -tags local -ldflags '-X indra.CI=true'" />
<go_parameters value="-v ./... -tags local -gcflags &quot;all=-trimpath=$ContentRoot$&quot;" />
<root_directory value="$PROJECT_DIR$" />
<kind value="DIRECTORY" />
<package value="git-indra.lan/indra-labs/indra/pkg/engine" />

View File

@@ -22,7 +22,7 @@ speech.
With ubiquitous 128 and 256 bit AES encryption now in use by default, the
content of messages is secure. However, the volume of messages and endpoints of
signals are still useful intelligence data, enabling state level actors to
signals are still useful intelligence data, enabling state level actors to
attack internet users and violate their privacy and threaten their safety.
Protecting against this high level attack the main network currently doing
@@ -36,32 +36,10 @@ worse, the most common use case is tunneling back out of the network to
anonymize location, is largely abused and led to a lot of automated block
systems arising on many internet services to prevent this abuse.
Indranet does not set itself up to be a direct competitor for the Tor network.
In its first few years of operation it will not have any mechanism for
tunneling out of the network, and if it ever does, this will be user-contributed
functionality, and not encouraged since any node providing exit becomes a target
for retaliation when used to abuse such external systems.
Indranet's purpose is to form an interconnect layer for decentralised network
protocols. It requires Lightning Network, as a primary requirement, to enable
the payment for bandwidth, and thus it also requires connectivity to the
Bitcoin network. Thus, all nodes, both relays and clients, will provide exit
traffic for these two protocols, especially Bitcoin, which has a very low
bandwidth requirement for simple transaction publishing.
Users will potentially be able to set up arbitrary exit services, but the core
project will only target connectivity with decentralised peer to peer services.
Secondarily, it will be possible for users to set up private, non advertised
exit services, protected via certificate authentication, such as SSH and other
remote access systems. This will serve to displace the use cases for Tor with
SSH and web services.
Later, rendezvous access protocols will be added and enable the creation of
arbitrary hidden service addresses such as web applications.
# fin
notes:
`([a-zA-z0-9\_\-\.][a-zA-z0-9\/\_\-\.]+)\:([0-9]+)` is a regex that
matches the relative file paths in the log output. $1 and $2 from this are the relative path and the line number.
`([a-zA-z0-9\_\-\.][a-zA-z0-9\/\_\-\.]+)\:([0-9]+)` is a regex that matches the
relative file paths in the log output. $1 and $2 from this are the relative path
and the line number.

799
go.sum

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,7 @@
package p2p
import (
"errors"
"github.com/dgraph-io/badger/v3"
"github.com/indra-labs/indra/pkg/cfg"
"github.com/indra-labs/indra/pkg/storage"
@@ -41,7 +42,7 @@ func configureKey() {
return nil
})
if err == badger.ErrKeyNotFound {
if errors.Is(err, badger.ErrKeyNotFound) {
log.I.Ln("key not found, generating a new one")

View File

@@ -392,11 +392,15 @@ func logPrint(
if int(Longest.Load()) < len(loc) {
Longest.Store(uint32(len(loc)))
}
formatString := "%s%s %s %s"
formatString := "%s%s %s%s %s"
//timeText = time.Now().Format("2006-01-02 15:04:05.999999999 UTC+0700")
if logLevel > Info {
loc = GetLoc(3, subsystem)
loc = loc + strings.Repeat(" ", int(Longest.Load())-len(loc)+1)
count := int(Longest.Load()) - len(loc) + 1
if count < 0 {
count = 0
}
loc = loc + strings.Repeat(" ", count)
tsf = timeStampFormat
}
var app string
@@ -408,8 +412,9 @@ func logPrint(
formatString,
loc,
timeText,
strings.ToUpper(app)+" ",
LevelSpecs[level].Colorizer(
strings.ToUpper(app),
LvlStr[level],
),
printFunc(),
)

View File

@@ -34,7 +34,7 @@ const (
Patch = 15
)
var CI = "false"
var CI = "true"
// Version returns a pretty printed version information string.
func Version() string {