lavanet / lava Goto Github PK
View Code? Open in Web Editor NEWLicense: Apache License 2.0
License: Apache License 2.0
Line 272 in 1fb2445
These lines:
ifeq (,$(LAVA_BINARY))
LAVA_BINARY := bad
# these will be called if target is "build" or "install" and $(LAVA_BINARY)
# remains undefined.
build-bad install-bad docker-build-bad:
$(error "target '$(call prefix,-,$@)' requires valid env 'LAVA_BINARY'")
else
$(call validate_binary,$(LAVA_BINARY),\
"targets 'build'(comma) 'install' require valid env 'LAVA_BINARY'")
endif
cause this error on mac:
(base) % LAVA_BINARY=lavad make install
Makefile:284: *** "No rule to make target ''". Stop.
I tried playing with the call syntax:
$(call validate_binary,$(LAVA_BINARY),\
"targets 'build'(comma) 'install' require valid env 'LAVA_BINARY'")
but the make on mac does not like it. this was my fix:
ifeq (,$(LAVA_BINARY))
LAVA_BINARY := bad
# these will be called if target is "build" or "install" and $(LAVA_BINARY)
# remains undefined.
build-bad install-bad docker-build-bad:
$(error "target '$(call prefix,-,$@)' requires valid env 'LAVA_BINARY'")
else
$(info LAVA_BINARY is [$(LAVA_BINARY)])
$(info valid_binaries is [$(valid_binaries)])
ifeq (,$(findstring $(LAVA_BINARY),$(valid_binaries)))
$(error "targets 'build', 'install' require valid env 'LAVA_BINARY'")
endif
endif
And after this change it compiled:
(base) % lavad --help
Lava blockchain node daemon
Usage:
lavad [command]
Available Commands:
add-genesis-account Add a genesis account to genesis.json
badgegenerator badgegenerator sets up a server to listen for badges requests from the lava sdk and respond with a signed badge
collect-gentxs Collect genesis txs and output a genesis.json file
config Create or query an application CLI configuration file
debug Tool for helping with debugging your application
export Export state to JSON
gentx Generate a genesis tx carrying a self delegation
help Help about any command
init Initialize private validator, p2p, genesis, and application configuration files
keys Manage your application's keys
migrate Migrate genesis to a specified target version
query Querying subcommands
rollback rollback cosmos-sdk and tendermint state by one height
rpcconsumer rpcconsumer sets up a server to perform api requests and sends them through the lava protocol to data providers
rpcprovider rpcprovider sets up a server to listen for rpc-consumers requests from the lava protocol send them to a configured node and respond with the reply
start Run the full node
status Query remote node for status
tendermint Tendermint subcommands
test Test commands for protocol network
tx Transactions subcommands
validate-genesis validates the genesis file at the default location or at the location passed as an arg
version Print the application binary version information
Flags:
-h, --help help for lavad
--home string directory for config and data (default "/Users/mikecotic/.lava")
--log_format string The logging format (json|plain) (default "plain")
--log_level string The logging level (trace|debug|info|warn|error|fatal|panic) (default "info")
--trace print out full stack trace on errors
Use "lavad [command] --help" for more information about a command.
We have verbose API descriptions in the SPEC, which are challenging to write and review.
For example, in lava spec, this setting repeats for all endpoints:
{
"name": "/lavanet/lava/conflict/conflict_vote/{index}",
"block_parsing": {
"parser_arg": [
"latest"
],
"parser_func": "DEFAULT"
},
"compute_units": 10,
"enabled": true,
"category": {
"deterministic": true,
"local": false,
"subscription": false,
"stateful": 0
},
"extra_compute_units": 0
}
https://github.com/lavanet/lava/blob/main/cookbook/specs/lava.json#L36
The same thing for verifications and extensions
https://github.com/lavanet/lava/blob/main/cookbook/specs/lava.json#L1247
https://github.com/lavanet/lava/blob/main/cookbook/specs/lava.json#L2463
https://github.com/lavanet/lava/blob/main/cookbook/specs/lava.json#L2507
Now spec is verbose and we have a lot of repeats for endpoints
The idea is to create a new spec lang on top of the current lang, the same way as TS for JS, but for spec.
Here is an example of a new spec language
api_collections:
- enabled: true
collection_data:
api_interface: "rest"
type: "GET"
# default settings for each endpoint
api_default:
block_parsing:
parser_arg: ["latest"]
purser_func: "DEFAULT"
computute_unit: 10
enabled: true
category:
deterministic: true
local: false
subscription: false
stateful: false
extra_compute_units: 0
apis:
# here is an example of endpoints with default params
- name: [
'/example/example/v1beta1/params',
'/example/example/v1beta1/params',
'/example/example/v1beta1/params',
]
# here is the example of the batch of endpoints with overridden params
- name: [
"/example/example/v1beta1/params",
"/example/example/v1beta1/params",
"/example/example/v1beta1/params",
]
cotegory:
deterministic: true
# override single endpoint settings
- name: '/example/example/v1beta1/params'
extra_compute_units: 5
This YAML example will be transpile to regular JSON spec.
The compiler will convert bidirectional
json -> yaml
yaml -> json
This approach will increase the readability of spec and maintainability. We don't need to modify existing spec logic on-chain, because translation will be done off-chain.
Testing new workflow [PLEASE IGNORE]
others
No response
Issue tracker is ONLY used for reporting bugs. Support or new features should be discussed on Lava's Discord channel.
๐ SECTIONS BELOW ARE NOT OBLIGATORY ๐
Title: Load Saved Payment Proofs from Disk at Start
Date: April 16, 2023
Author: Ran
The current reward server saves payment proofs, but it loses all proofs when there is a reset or panic. This problem needs to be solved to ensure that the reward server can continue its operation without losing essential information.
The main objective is to enable the reward server to load saved payment proofs from disk at startup to avoid losing any data during a reset or panic.
The success of this PRD will be measured by the ability of the reward server to load saved payment proofs from disk at startup without losing any data during resets or panics.
The Reward Server package in Golang is used for managing consumer rewards and payment handling. It is designed to interact with the Lava Network.
PrepareRewardsForClaim
: Prepares rewards and data reliability proofs for claim submission.SendNewProof
: Adds a new relay session proof to the reward server.SendNewDataReliabilityProof
: Adds a new data reliability proof to the reward server.UpdateEpoch
: Sends rewards claims and identifies any missing payments.sendRewardsClaim
: Sends rewards claims for a specific epoch.identifyMissingPayments
: Identifies and logs any missing payments.gatherRewardsForClaim
: Gathers rewards and data reliability proofs for a specific epoch.SubscribeStarted
: Placeholder function for handling the start of a subscription.SubscribeEnded
: Placeholder function for handling the end of a subscription.PaymentHandler
: Handles incoming payment requests and updates the total CU paid.The reward server package works by managing consumer rewards in memory and submitting claims to receive rewards. The server keeps track of rewards and data reliability proofs for each consumer and epoch. When it's time to submit claims, the server gathers the rewards and proofs, sends the transactions, and removes the claimed rewards from memory. The server also handles incoming payments by updating the total CU paid and removing the expected payment from the list.
test
test
test
In doc, delegate limit is not required
https://docs.lavanet.xyz/provider-setup#lava-testnet-in-us-with-specified-validator
In code is required
Need a fix to make this consistent
lavap 2.1.2
No response
build success
Error with following log :
make install
go install -mod=readonly -tags "netgo ledger" -ldflags '-X github.com/cosmos/cosmos-sdk/version.Name=lava -X github.com/cosmos/cosmos-sdk/version.AppName=lavad -X github.com/cosmos/cosmos-sdk/version.Version=0.4.0 -X github.com/cosmos/cosmos-sdk/version.Commit=e2c69db54ed355cb42b02a9fd21faf890f66eca8 -X github.com/cosmos/cosmos-sdk/version.BuildTags=netgo ledger, -X github.com/lavanet/lava/relayer/chainproxy.ReturnMaskedErrors=false -X github.com/lavanet/lava/utils.TimeoutMutex=false -w -s' -trimpath ./...
# github.com/lavanet/lava/cmd/lavad
usage: link [options] main.o
-B note
add an ELF NT_GNU_BUILD_ID note when using ELF
-E entry
set entry symbol name
-H type
set header type
-I linker
use linker as ELF dynamic linker
-L directory
add specified directory to library path
-R quantum
set address rounding quantum (default -1)
-T address
set text segment address (default -1)
-V print version and exit
-X definition
add string value definition of the form importpath.name=value
-a no-op (deprecated)
-asan
enable ASan interface
-aslr
enable ASLR for buildmode=c-shared on windows (default true)
-benchmark string
set to 'mem' or 'cpu' to enable phase benchmarking
-benchmarkprofile base
emit phase profiles to base_phase.{cpu,mem}prof
-buildid id
record id as Go toolchain build id
-buildmode mode
set build mode
-c dump call graph
-compressdwarf
compress DWARF if possible (default true)
-cpuprofile file
write cpu profile to file
-d disable dynamic executable
-debugnosplit
dump nosplit call graph
-debugtextsize int
debug text section max size
-debugtramp int
debug trampolines
-dumpdep
dump symbol dependency graph
-extar string
archive program for buildmode=c-archive
-extld linker
use linker when linking in external mode
-extldflags flags
pass flags to external linker
-f ignore version mismatch
-g disable go package data checks
-h halt on error
-importcfg file
read import configuration from file
-installsuffix suffix
set package directory suffix
-k symbol
set field tracking symbol
-libgcc string
compiler support lib for internal linking; use "none" to disable
-linkmode mode
set link mode
-linkshared
link against installed Go shared libraries
-memprofile file
write memory profile to file
-memprofilerate rate
set runtime.MemProfileRate to rate
-msan
enable MSan interface
-n dump symbol table
-o file
write output to file
-pluginpath string
full path name for plugin
-r path
set the ELF dynamic linker search path to dir1:dir2:...
-race
enable race detector
-s disable symbol table
-strictdups int
sanity check duplicate symbol contents during object file reading (1=warn 2=err).
-tmpdir directory
use directory for temporary files
-v print link trace
-w disable DWARF generation
make: *** [Makefile:95: install] Error 2
1 - install go v1.19.4
2 - checkout lava v0.4.0
3 - make build or make install
OS and version: Debian 11
test
test
test
Issue tracker is ONLY used for reporting bugs. Support or new features should be discussed on Lava's Discord channel.
When clicking on the litepaper link, the Lava litepaper should be accessible.
The link is broken, leading to a 404 error page.
๐ SECTIONS BELOW ARE NOT OBLIGATORY ๐
Re-upload the litepaper to Lava or connect it with the correct link
os: Centos 7.9
run command
# LAVA_BINARY=lavap make install
Makefile:277: *** missing separator. Stop.
how can fix it
Issue tracker is ONLY used for reporting bugs. Support or new features should be discussed on Lava's Discord channel.
๐ SECTIONS BELOW ARE NOT OBLIGATORY ๐
"Opps! Looks like something went wrong :( If you have time please report it to our github"
https://bd.lavanet.xyz/accounts/lava@1us59u4u0t5l243hmkvrz5fvthpxu0c20axm4ra
Monitoring forbole/big-dipper-2.0-cosmos#63 | Software upgrade v0.15.1 after "Yes"
Based on discord announcement proposal โ32 was actually created at 2023-02-21T03:37:39 UTC+7
or 2023-02-20T21:37:39 UTC
.
However when you take a look at the proposal details:
https://lava-testnet.nodejumper.io:1317/cosmos/gov/v1beta1/proposals/32
"voting_start_time": "2023-02-21T01:37:39.427455892Z",
"voting_end_time": "2023-02-21T13:37:39.427455892Z"
It says that voting starts at 2023-02-21T01:37:39 UTC
, which is wrong and 4 hours ahead the actual creation time, voting end time is moved to 4 hours respectively, which makes explorers/bots to show misleading information.
"voting_start_time": "2023-02-20T21:37:39.427455892Z",
"voting_end_time": "2023-02-21T09:37:39.427455892Z"
"voting_start_time": "2023-02-21T01:37:39.427455892Z",
"voting_end_time": "2023-02-21T13:37:39.427455892Z"
Great product
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.