Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: PRT - provider load forwarded to provider optimizer #1759

Draft
wants to merge 67 commits into
base: main
Choose a base branch
from
Draft
Changes from 2 commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
7b8ea69
load rate report in trailer
Sep 30, 2024
4f7838a
fix trailer name
Sep 30, 2024
4fead99
merge main
Sep 30, 2024
ea1598b
fix lint
Sep 30, 2024
04f1762
fix load manager logic
Sep 30, 2024
eb2b345
fix lint
Sep 30, 2024
2c33935
fix spelling
Sep 30, 2024
46e6faf
fix logic
Sep 30, 2024
1f977ae
fixed flag & header names
Oct 1, 2024
6db7dd3
fix load provider manager and creation logic
Oct 1, 2024
b9e199b
fix logs for relay load rate
Oct 1, 2024
8b8a05a
fix rpcprovider server relay load handling
Oct 1, 2024
5e3b7a4
fix tests
Oct 1, 2024
199ff2c
fix typo
Oct 1, 2024
9faf8ef
fix init lava script
Oct 1, 2024
cc1af1e
Merge branch 'main' into prt-add-provider-relay-load-trailer
Oct 1, 2024
56191f6
fix provider load manager
Oct 1, 2024
9eabb5a
fix provider server and load manager
Oct 1, 2024
ffdb986
fix lint - fix protocol test
Oct 1, 2024
19cc454
fix provider load manager applyProviderLoadMetadataToContextTrailer
Oct 1, 2024
b73d267
Merge branch 'main' into prt-add-provider-relay-load-trailer
Oct 1, 2024
5a29efd
change cmdRPCProvider load rate flag to uint64
Oct 1, 2024
93c3220
try fix
Oct 1, 2024
eeb46ea
fix cmd flag reading
Oct 1, 2024
55221f6
adjusting uint64
ranlavanet Oct 2, 2024
e81afb9
fix redundent nil check in provider load manager
Oct 3, 2024
56c2b3f
Merge branch 'prt-add-provider-relay-load-trailer' of github.com:lava…
Oct 3, 2024
725f40a
fix providerLoadManager per chain creation
Oct 3, 2024
6da0e99
rename and fix instance passing unnecessarily
ranlavanet Oct 3, 2024
9458d6c
fixed chainlib common formatting
Oct 6, 2024
44a5e5c
fix provider load manager comments
Oct 6, 2024
03e1b17
fix e2e tests
Oct 6, 2024
c4bc4ec
fix pr - unite add relay load and set trailer
Oct 6, 2024
2bd9032
fix common.go provider load header
Oct 6, 2024
a44f0ab
fix edge case of getProviderLoad
Oct 6, 2024
50dab3f
Merge branch 'main' into prt-add-provider-relay-load-trailer
Oct 7, 2024
c88aee2
fix command flag description
Oct 8, 2024
30efbf1
fix command flag description
Oct 8, 2024
810db13
add metric for load rate
Oct 8, 2024
82f3020
fix division to be float and not uint
Oct 8, 2024
14d8c68
roll back init lava only with node two consumers
Oct 8, 2024
2d61289
fix load metric
Oct 8, 2024
280074b
merge branch 'main' into prt-add-provider-relay-load-trailer
Oct 9, 2024
97f72ec
merge main
Oct 9, 2024
454db08
Update protocol/chainlib/common.go
Oct 9, 2024
78ed595
Merge branch 'main' into prt-add-provider-relay-load-trailer
Oct 9, 2024
63a0e89
Merge branch 'prt-add-provider-relay-load-trailer' of github.com:lava…
Oct 9, 2024
d4c7258
fix load calculation
ranlavanet Oct 10, 2024
273a32a
tidy code
ranlavanet Oct 10, 2024
6fb7276
changing rate limit to 1k
ranlavanet Oct 10, 2024
272e676
fix bug
ranlavanet Oct 10, 2024
42486ac
fix pr
ranlavanet Oct 10, 2024
9484f9f
Merge branch 'main' into prt-add-provider-relay-load-trailer
omerlavanet Oct 15, 2024
1974720
Merge branch 'prt-add-provider-relay-load-trailer' into PRT-provider-…
ranlavanet Oct 27, 2024
a42cfdd
WIP
ranlavanet Oct 27, 2024
ecd416c
Merge branch 'main' into prt-add-provider-relay-load-trailer
ranlavanet Oct 27, 2024
974dbcb
v4
ranlavanet Oct 27, 2024
258578f
Merge branch 'main' into prt-add-provider-relay-load-trailer
ranlavanet Oct 27, 2024
2f5241d
wip 2
ranlavanet Oct 27, 2024
feeb373
fix pr
ranlavanet Oct 27, 2024
a2b4de2
Merge branch 'prt-add-provider-relay-load-trailer' into PRT-provider-…
ranlavanet Oct 27, 2024
39f439f
WIP3
ranlavanet Oct 27, 2024
51894ce
fix
ranlavanet Oct 27, 2024
1c98ff7
Merge branch 'prt-add-provider-relay-load-trailer' into PRT-provider-…
ranlavanet Oct 27, 2024
93a7b78
forwarding provider load to optimizer
ranlavanet Oct 27, 2024
4f04611
wip
ranlavanet Oct 27, 2024
4280c67
append relay data - WIP
ranlavanet Oct 30, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions protocol/rpcprovider/rpcprovider.go
Original file line number Diff line number Diff line change
@@ -720,10 +720,7 @@ rpcprovider 127.0.0.1:3333 OSMOSIS tendermintrpc "wss://www.node-path.com:80,htt
if stickinessHeaderName != "" {
RPCProviderStickinessHeaderName = stickinessHeaderName
}
relayLoadLimit, err := cmd.Flags().GetUint(common.RateLimitRequestPerSecondFlag)
if err != nil {
utils.LavaFormatFatal("failed to read relay concurrent load limit flag", err)
}
relayLoadLimit := viper.GetUint64(common.RateLimitRequestPerSecondFlag)
prometheusListenAddr := viper.GetString(metrics.MetricsListenFlagName)
rewardStoragePath := viper.GetString(rewardserver.RewardServerStorageFlagName)
rewardTTL := viper.GetDuration(rewardserver.RewardTTLFlagName)
@@ -761,7 +758,7 @@ rpcprovider 127.0.0.1:3333 OSMOSIS tendermintrpc "wss://www.node-path.com:80,htt
&rpcProviderHealthCheckMetricsOptions,
staticProvider,
offlineSpecPath,
uint64(relayLoadLimit),
relayLoadLimit,
}

rpcProvider := RPCProvider{}
@@ -798,7 +795,7 @@ rpcprovider 127.0.0.1:3333 OSMOSIS tendermintrpc "wss://www.node-path.com:80,htt
cmdRPCProvider.Flags().BoolVar(&chainlib.IgnoreSubscriptionNotConfiguredError, chainlib.IgnoreSubscriptionNotConfiguredErrorFlag, chainlib.IgnoreSubscriptionNotConfiguredError, "ignore webSocket node url not configured error, when subscription is enabled in spec")
cmdRPCProvider.Flags().IntVar(&numberOfRetriesAllowedOnNodeErrors, common.SetRelayCountOnNodeErrorFlag, 2, "set the number of retries attempt on node errors")
cmdRPCProvider.Flags().String(common.UseStaticSpecFlag, "", "load offline spec provided path to spec file, used to test specs before they are proposed on chain, example for spec with inheritance: --use-static-spec ./cookbook/specs/ibc.json,./cookbook/specs/tendermint.json,./cookbook/specs/cosmossdk.json,./cookbook/specs/ethermint.json,./cookbook/specs/ethereum.json,./cookbook/specs/evmos.json")
cmdRPCProvider.Flags().Uint(common.RateLimitRequestPerSecondFlag, 0, "rate limit requests per second - per chain - default unlimited")
cmdRPCProvider.Flags().Uint64(common.RateLimitRequestPerSecondFlag, 0, "rate limit requests per second - per chain - default unlimited")
common.AddRollingLogConfig(cmdRPCProvider)
return cmdRPCProvider
}
Loading