graphprotocol / allocation-optimizer

Agents and algorithms for optimizing Indexer decision problems.
MIT License
14 stars 13 forks source link

ERROR: HTTP.Exceptions.StatusError #35

Closed suntzu93 closed 1 year ago

suntzu93 commented 1 year ago

I tried latest version v2.1.1 and got this error :

[ Info: Querying data from https://api.thegraph.com/subgraphs/name/graphprotocol/graph-network-arbitrum
[ Info: Writing table to data/indexer.csv
[ Info: Writing table to data/allocation.csv
[ Info: Writing table to data/subgraph.csv
[ Info: Writing table to data/network.csv
[ Info: Optimizing
[ Info: Writing results report
[ Info: Executing best strategy
ERROR: HTTP.Exceptions.StatusError(404, "POST", "/", HTTP.Messages.Response:
"""
HTTP/1.1 404 Not Found
Server: nginx/1.18.0 (Ubuntu)
Date: Mon, 17 Apr 2023 23:11:11 GMT
Content-Type: text/plain
Content-Length: 9
Connection: keep-alive
access-control-allow-origin: *

Not found""")
Stacktrace:
  [1] (::HTTP.ExceptionRequest.var"#1#3"{HTTP.ExceptionRequest.var"#1#2#4"{typeof(HTTP.StreamRequest.streamlayer)}})(stream::HTTP.Streams.Stream{HTTP.Messages.Response, HTTP.ConnectionPool.Connection{Sockets.TCPSocket}}; status_exception::Bool, kw::Base.Pairs{Symbol, Union{Nothing, Int64}, Tuple{Symbol, Symbol, Symbol}, NamedTuple{(:iofunction, :decompress, :verbose), Tuple{Nothing, Nothing, Int64}}})
    @ HTTP.ExceptionRequest ~/.julia/packages/HTTP/z8l0i/src/clientlayers/ExceptionRequest.jl:16
  [2] #1#2
    @ ~/.julia/packages/HTTP/z8l0i/src/clientlayers/TimeoutRequest.jl:17 [inlined]
  [3] (::HTTP.ConnectionRequest.var"#1#7"{HTTP.ConnectionRequest.var"#1#2#8"{HTTP.TimeoutRequest.var"#1#6"{HTTP.TimeoutRequest.var"#1#2#7"{HTTP.ExceptionRequest.var"#1#3"{HTTP.ExceptionRequest.var"#1#2#4"{typeof(HTTP.StreamRequest.streamlayer)}}}}}})(req::HTTP.Messages.Request; proxy::Nothing, socket_type::Type, socket_type_tls::Type, readtimeout::Int64, kw::Base.Pairs{Symbol, Union{Nothing, Int64}, Tuple{Symbol, Symbol, Symbol}, NamedTuple{(:iofunction, :decompress, :verbose), Tuple{Nothing, Nothing, Int64}}})
    @ HTTP.ConnectionRequest ~/.julia/packages/HTTP/z8l0i/src/clientlayers/ConnectionRequest.jl:111
  [4] (::HTTP.CanonicalizeRequest.var"#1#3"{HTTP.CanonicalizeRequest.var"#1#2#4"{HTTP.ConnectionRequest.var"#1#7"{HTTP.ConnectionRequest.var"#1#2#8"{HTTP.TimeoutRequest.var"#1#6"{HTTP.TimeoutRequest.var"#1#2#7"{HTTP.ExceptionRequest.var"#1#3"{HTTP.ExceptionRequest.var"#1#2#4"{typeof(HTTP.StreamRequest.streamlayer)}}}}}}}})(req::HTTP.Messages.Request; canonicalize_headers::Bool, kw::Base.Pairs{Symbol, Union{Nothing, Int64}, NTuple{4, Symbol}, NamedTuple{(:iofunction, :decompress, :verbose, :readtimeout), Tuple{Nothing, Nothing, Int64, Int64}}})
    @ HTTP.CanonicalizeRequest ~/.julia/packages/HTTP/z8l0i/src/clientlayers/CanonicalizeRequest.jl:17
  [5] (::Base.var"#88#90"{Base.var"#88#89#91"{ExponentialBackOff, HTTP.RetryRequest.var"#3#6"{Int64, typeof(HTTP.RetryRequest.FALSE), HTTP.Messages.Request, Base.RefValue{Int64}}, HTTP.CanonicalizeRequest.var"#1#3"{HTTP.CanonicalizeRequest.var"#1#2#4"{HTTP.ConnectionRequest.var"#1#7"{HTTP.ConnectionRequest.var"#1#2#8"{HTTP.TimeoutRequest.var"#1#6"{HTTP.TimeoutRequest.var"#1#2#7"{HTTP.ExceptionRequest.var"#1#3"{HTTP.ExceptionRequest.var"#1#2#4"{typeof(HTTP.StreamRequest.streamlayer)}}}}}}}}}})(args::HTTP.Messages.Request; kwargs::Base.Pairs{Symbol, Union{Nothing, Int64}, NTuple{4, Symbol}, NamedTuple{(:iofunction, :decompress, :verbose, :readtimeout), Tuple{Nothing, Nothing, Int64, Int64}}})
    @ Base ./error.jl:296
  [6] (::HTTP.RetryRequest.var"#1#4"{HTTP.RetryRequest.var"#1#2#5"{HTTP.CanonicalizeRequest.var"#1#3"{HTTP.CanonicalizeRequest.var"#1#2#4"{HTTP.ConnectionRequest.var"#1#7"{HTTP.ConnectionRequest.var"#1#2#8"{HTTP.TimeoutRequest.var"#1#6"{HTTP.TimeoutRequest.var"#1#2#7"{HTTP.ExceptionRequest.var"#1#3"{HTTP.ExceptionRequest.var"#1#2#4"{typeof(HTTP.StreamRequest.streamlayer)}}}}}}}}}})(req::HTTP.Messages.Request; retry::Bool, retries::Int64, retry_delays::ExponentialBackOff, retry_check::Function, retry_non_idempotent::Bool, kw::Base.Pairs{Symbol, Union{Nothing, Int64}, NTuple{4, Symbol}, NamedTuple{(:iofunction, :decompress, :verbose, :readtimeout), Tuple{Nothing, Nothing, Int64, Int64}}})
    @ HTTP.RetryRequest ~/.julia/packages/HTTP/z8l0i/src/clientlayers/RetryRequest.jl:75
  [7] (::HTTP.CookieRequest.var"#1#5"{HTTP.CookieRequest.var"#1#2#6"{HTTP.RetryRequest.var"#1#4"{HTTP.RetryRequest.var"#1#2#5"{HTTP.CanonicalizeRequest.var"#1#3"{HTTP.CanonicalizeRequest.var"#1#2#4"{HTTP.ConnectionRequest.var"#1#7"{HTTP.ConnectionRequest.var"#1#2#8"{HTTP.TimeoutRequest.var"#1#6"{HTTP.TimeoutRequest.var"#1#2#7"{HTTP.ExceptionRequest.var"#1#3"{HTTP.ExceptionRequest.var"#1#2#4"{typeof(HTTP.StreamRequest.streamlayer)}}}}}}}}}}}})(req::HTTP.Messages.Request; cookies::Bool, cookiejar::HTTP.Cookies.CookieJar, kw::Base.Pairs{Symbol, Union{Nothing, Integer}, NTuple{6, Symbol}, NamedTuple{(:iofunction, :decompress, :verbose, :retries, :readtimeout, :retry_non_idempotent), Tuple{Nothing, Nothing, Int64, Int64, Int64, Bool}}})
    @ HTTP.CookieRequest ~/.julia/packages/HTTP/z8l0i/src/clientlayers/CookieRequest.jl:42
  [8] (::HTTP.ContentTypeDetection.var"#1#3"{HTTP.ContentTypeDetection.var"#1#2#4"{HTTP.CookieRequest.var"#1#5"{HTTP.CookieRequest.var"#1#2#6"{HTTP.RetryRequest.var"#1#4"{HTTP.RetryRequest.var"#1#2#5"{HTTP.CanonicalizeRequest.var"#1#3"{HTTP.CanonicalizeRequest.var"#1#2#4"{HTTP.ConnectionRequest.var"#1#7"{HTTP.ConnectionRequest.var"#1#2#8"{HTTP.TimeoutRequest.var"#1#6"{HTTP.TimeoutRequest.var"#1#2#7"{HTTP.ExceptionRequest.var"#1#3"{HTTP.ExceptionRequest.var"#1#2#4"{typeof(HTTP.StreamRequest.streamlayer)}}}}}}}}}}}}}})(req::HTTP.Messages.Request; detect_content_type::Bool, kw::Base.Pairs{Symbol, Union{Nothing, Integer}, NTuple{6, Symbol}, NamedTuple{(:iofunction, :decompress, :verbose, :retries, :readtimeout, :retry_non_idempotent), Tuple{Nothing, Nothing, Int64, Int64, Int64, Bool}}})
    @ HTTP.ContentTypeDetection ~/.julia/packages/HTTP/z8l0i/src/clientlayers/ContentTypeRequest.jl:23
  [9] (::HTTP.BasicAuthRequest.var"#1#3"{HTTP.BasicAuthRequest.var"#1#2#4"{HTTP.ContentTypeDetection.var"#1#3"{HTTP.ContentTypeDetection.var"#1#2#4"{HTTP.CookieRequest.var"#1#5"{HTTP.CookieRequest.var"#1#2#6"{HTTP.RetryRequest.var"#1#4"{HTTP.RetryRequest.var"#1#2#5"{HTTP.CanonicalizeRequest.var"#1#3"{HTTP.CanonicalizeRequest.var"#1#2#4"{HTTP.ConnectionRequest.var"#1#7"{HTTP.ConnectionRequest.var"#1#2#8"{HTTP.TimeoutRequest.var"#1#6"{HTTP.TimeoutRequest.var"#1#2#7"{HTTP.ExceptionRequest.var"#1#3"{HTTP.ExceptionRequest.var"#1#2#4"{typeof(HTTP.StreamRequest.streamlayer)}}}}}}}}}}}}}}}})(req::HTTP.Messages.Request; basicauth::Bool, kw::Base.Pairs{Symbol, Union{Nothing, Integer}, NTuple{6, Symbol}, NamedTuple{(:iofunction, :decompress, :verbose, :retries, :readtimeout, :retry_non_idempotent), Tuple{Nothing, Nothing, Int64, Int64, Int64, Bool}}})
    @ HTTP.BasicAuthRequest ~/.julia/packages/HTTP/z8l0i/src/clientlayers/BasicAuthRequest.jl:22
 [10] (::HTTP.DefaultHeadersRequest.var"#1#3"{HTTP.DefaultHeadersRequest.var"#1#2#4"{HTTP.BasicAuthRequest.var"#1#3"{HTTP.BasicAuthRequest.var"#1#2#4"{HTTP.ContentTypeDetection.var"#1#3"{HTTP.ContentTypeDetection.var"#1#2#4"{HTTP.CookieRequest.var"#1#5"{HTTP.CookieRequest.var"#1#2#6"{HTTP.RetryRequest.var"#1#4"{HTTP.RetryRequest.var"#1#2#5"{HTTP.CanonicalizeRequest.var"#1#3"{HTTP.CanonicalizeRequest.var"#1#2#4"{HTTP.ConnectionRequest.var"#1#7"{HTTP.ConnectionRequest.var"#1#2#8"{HTTP.TimeoutRequest.var"#1#6"{HTTP.TimeoutRequest.var"#1#2#7"{HTTP.ExceptionRequest.var"#1#3"{HTTP.ExceptionRequest.var"#1#2#4"{typeof(HTTP.StreamRequest.streamlayer)}}}}}}}}}}}}}}}}}})(req::HTTP.Messages.Request; iofunction::Nothing, decompress::Nothing, kw::Base.Pairs{Symbol, Integer, NTuple{4, Symbol}, NamedTuple{(:verbose, :retries, :readtimeout, :retry_non_idempotent), Tuple{Int64, Int64, Int64, Bool}}})
    @ HTTP.DefaultHeadersRequest ~/.julia/packages/HTTP/z8l0i/src/clientlayers/DefaultHeadersRequest.jl:47
 [11] (::HTTP.RedirectRequest.var"#1#4"{HTTP.RedirectRequest.var"#1#2#5"{HTTP.DefaultHeadersRequest.var"#1#3"{HTTP.DefaultHeadersRequest.var"#1#2#4"{HTTP.BasicAuthRequest.var"#1#3"{HTTP.BasicAuthRequest.var"#1#2#4"{HTTP.ContentTypeDetection.var"#1#3"{HTTP.ContentTypeDetection.var"#1#2#4"{HTTP.CookieRequest.var"#1#5"{HTTP.CookieRequest.var"#1#2#6"{HTTP.RetryRequest.var"#1#4"{HTTP.RetryRequest.var"#1#2#5"{HTTP.CanonicalizeRequest.var"#1#3"{HTTP.CanonicalizeRequest.var"#1#2#4"{HTTP.ConnectionRequest.var"#1#7"{HTTP.ConnectionRequest.var"#1#2#8"{HTTP.TimeoutRequest.var"#1#6"{HTTP.TimeoutRequest.var"#1#2#7"{HTTP.ExceptionRequest.var"#1#3"{HTTP.ExceptionRequest.var"#1#2#4"{typeof(HTTP.StreamRequest.streamlayer)}}}}}}}}}}}}}}}}}}}})(req::HTTP.Messages.Request; redirect::Bool, redirect_limit::Int64, redirect_method::Nothing, forwardheaders::Bool, response_stream::Nothing, kw::Base.Pairs{Symbol, Integer, NTuple{4, Symbol}, NamedTuple{(:verbose, :retries, :readtimeout, :retry_non_idempotent), Tuple{Int64, Int64, Int64, Bool}}})
    @ HTTP.RedirectRequest ~/.julia/packages/HTTP/z8l0i/src/clientlayers/RedirectRequest.jl:25
 [12] #1#2
    @ ~/.julia/packages/HTTP/z8l0i/src/clientlayers/DebugRequest.jl:23 [inlined]
 [13] (::HTTP.MessageRequest.var"#1#3"{HTTP.MessageRequest.var"#1#2#4"{HTTP.DebugRequest.var"#1#4"{HTTP.DebugRequest.var"#1#2#5"{HTTP.RedirectRequest.var"#1#4"{HTTP.RedirectRequest.var"#1#2#5"{HTTP.DefaultHeadersRequest.var"#1#3"{HTTP.DefaultHeadersRequest.var"#1#2#4"{HTTP.BasicAuthRequest.var"#1#3"{HTTP.BasicAuthRequest.var"#1#2#4"{HTTP.ContentTypeDetection.var"#1#3"{HTTP.ContentTypeDetection.var"#1#2#4"{HTTP.CookieRequest.var"#1#5"{HTTP.CookieRequest.var"#1#2#6"{HTTP.RetryRequest.var"#1#4"{HTTP.RetryRequest.var"#1#2#5"{HTTP.CanonicalizeRequest.var"#1#3"{HTTP.CanonicalizeRequest.var"#1#2#4"{HTTP.ConnectionRequest.var"#1#7"{HTTP.ConnectionRequest.var"#1#2#8"{HTTP.TimeoutRequest.var"#1#6"{HTTP.TimeoutRequest.var"#1#2#7"{HTTP.ExceptionRequest.var"#1#3"{HTTP.ExceptionRequest.var"#1#2#4"{typeof(HTTP.StreamRequest.streamlayer)}}}}}}}}}}}}}}}}}}}}}}}})(method::String, url::URIs.URI, headers::Dict{Any, Any}, body::String; copyheaders::Bool, response_stream::Nothing, http_version::HTTP.Strings.HTTPVersion, kw::Base.Pairs{Symbol, Integer, Tuple{Symbol, Symbol, Symbol}, NamedTuple{(:retries, :readtimeout, :retry_non_idempotent), Tuple{Int64, Int64, Bool}}})
    @ HTTP.MessageRequest ~/.julia/packages/HTTP/z8l0i/src/clientlayers/MessageRequest.jl:27
 [14] request(stack::HTTP.MessageRequest.var"#1#3"{HTTP.MessageRequest.var"#1#2#4"{HTTP.DebugRequest.var"#1#4"{HTTP.DebugRequest.var"#1#2#5"{HTTP.RedirectRequest.var"#1#4"{HTTP.RedirectRequest.var"#1#2#5"{HTTP.DefaultHeadersRequest.var"#1#3"{HTTP.DefaultHeadersRequest.var"#1#2#4"{HTTP.BasicAuthRequest.var"#1#3"{HTTP.BasicAuthRequest.var"#1#2#4"{HTTP.ContentTypeDetection.var"#1#3"{HTTP.ContentTypeDetection.var"#1#2#4"{HTTP.CookieRequest.var"#1#5"{HTTP.CookieRequest.var"#1#2#6"{HTTP.RetryRequest.var"#1#4"{HTTP.RetryRequest.var"#1#2#5"{HTTP.CanonicalizeRequest.var"#1#3"{HTTP.CanonicalizeRequest.var"#1#2#4"{HTTP.ConnectionRequest.var"#1#7"{HTTP.ConnectionRequest.var"#1#2#8"{HTTP.TimeoutRequest.var"#1#6"{HTTP.TimeoutRequest.var"#1#2#7"{HTTP.ExceptionRequest.var"#1#3"{HTTP.ExceptionRequest.var"#1#2#4"{typeof(HTTP.StreamRequest.streamlayer)}}}}}}}}}}}}}}}}}}}}}}}}, method::String, url::String, h::Dict{Any, Any}, b::String, q::Nothing; headers::Dict{Any, Any}, body::String, query::Nothing, kw::Base.Pairs{Symbol, Integer, Tuple{Symbol, Symbol, Symbol}, NamedTuple{(:retries, :readtimeout, :retry_non_idempotent), Tuple{Int64, Int64, Bool}}})
    @ HTTP ~/.julia/packages/HTTP/z8l0i/src/HTTP.jl:426
 [15] #request#16
    @ ~/.julia/packages/HTTP/z8l0i/src/HTTP.jl:286 [inlined]
 [16] #post#36
    @ ~/.julia/packages/HTTP/z8l0i/src/HTTP.jl:501 [inlined]
 [17] _execute(endpoint::String, execution_string::String, headers::Dict{Any, Any}, output_type::Type{Any}; retries::Int64, readtimeout::Int64, operation_name::Nothing, throw_on_execution_error::Bool)
    @ GraphQLClient ~/.julia/packages/GraphQLClient/Wm5fb/src/http_execution.jl:108
 [18] _execute(endpoint::String, execution_string::String, headers::Dict{Any, Any}, output_type::Type{Any})
    @ GraphQLClient ~/.julia/packages/GraphQLClient/Wm5fb/src/http_execution.jl:94
 [19] execute(endpoint::String, payload::Dict{String, Any}, headers::Dict{Any, Any}, output_type::Type{Any}; kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ GraphQLClient ~/.julia/packages/GraphQLClient/Wm5fb/src/http_execution.jl:80
 [20] execute(endpoint::String, payload::Dict{String, Any}, headers::Dict{Any, Any}, output_type::Type{Any})
    @ GraphQLClient ~/.julia/packages/GraphQLClient/Wm5fb/src/http_execution.jl:79
 [21] execute(client::GraphQLClient.Client, payload::Dict{String, Any}, output_type::Type{Any}; kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ GraphQLClient ~/.julia/packages/GraphQLClient/Wm5fb/src/http_execution.jl:74
 [22] execute(client::GraphQLClient.Client, payload::Dict{String, Any}, output_type::Type{Any})
    @ GraphQLClient ~/.julia/packages/GraphQLClient/Wm5fb/src/http_execution.jl:73
 [23] execute(client::GraphQLClient.Client, query::String, output_type::Type{Any}; variables::Dict{Any, Any}, operation_name::Nothing, kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ GraphQLClient ~/.julia/packages/GraphQLClient/Wm5fb/src/http_execution.jl:70
 [24] execute (repeats 2 times)
    @ ~/.julia/packages/GraphQLClient/Wm5fb/src/http_execution.jl:69 [inlined]
 [25] full_introspection!(client::GraphQLClient.Client)
    @ GraphQLClient ~/.julia/packages/GraphQLClient/Wm5fb/src/introspection.jl:111
 [26] get_mutations
    @ ~/.julia/packages/GraphQLClient/Wm5fb/src/client.jl:112 [inlined]
 [27] mutate(client::GraphQLClient.Client, mutation_name::String, args::Dict{String, Vector{Dict{String, Any}}}, output_type::Type; output_fields::Vector{String}, kwargs::Base.Pairs{Symbol, Bool, Tuple{Symbol}, NamedTuple{(:direct_write,), Tuple{Bool}}})
    @ GraphQLClient ~/.julia/packages/GraphQLClient/Wm5fb/src/mutations.jl:38
 [28] macro expansion
    @ ~/.julia/packages/Mocking/MRkF3/src/mock.jl:29 [inlined]
 [29] #mutate#6
    @ ~/.julia/packages/TheGraphData/SW6v8/src/mutate.jl:15 [inlined]
 [30] macro expansion
    @ ~/.julia/packages/Mocking/MRkF3/src/mock.jl:29 [inlined]
 [31] unallocate_action(#unused#::Val{:actionqueue}, a::TypedTables.FlexTable{1}, t::TypedTables.FlexTable{1}, config::Dict{String, Any})
    @ AllocationOpt ~/allocation-optimizer/src/reporting.jl:423
 [32] execute(a::TypedTables.FlexTable{1}, ix::Int64, s::TypedTables.FlexTable{1}, xs::Matrix{Float64}, ps::Matrix{Float64}, config::Dict{String, Any})
    @ AllocationOpt ~/allocation-optimizer/src/reporting.jl:570
 [33] main(config::Dict{String, Any})
    @ AllocationOpt ~/allocation-optimizer/src/AllocationOpt.jl:112
 [34] main
    @ ~/allocation-optimizer/src/AllocationOpt.jl:41 [inlined]
 [35] main
    @ ~/allocation-optimizer/src/AllocationOpt.jl:36 [inlined]
 [36] julia_main()
    @ AllocationOpt ~/allocation-optimizer/src/AllocationOpt.jl:28
 [37] top-level scope
    @ none:1
anirudh2 commented 1 year ago

@suntzu93 Could you post the associated config file?

Also, as a sanity check, please try running this with execution_mode = "rules". Just to make sure that it'll actually run end-to-end.

suntzu93 commented 1 year ago

my config :

id = "0x1b7e0068ca1d7929c8c56408d766e1510e54d98d"
writedir = "data"
max_allocations = 10
whitelist = []
blacklist = []
frozenlist = ["QmdCYUNpfWAE1WnxmV8D3uF6bTG4v1Pz1vFwH1ixASVqnD"]
pinnedlist = []
allocation_lifetime = 5
gas = 100
min_signal = 1000
verbose = true
num_reported_options = 2
execution_mode = "actionqueue"
indexer_url="http://localhost:8000"
network_subgraph_endpoint="https://api.thegraph.com/subgraphs/name/graphprotocol/graph-network-arbitrum"
suntzu93 commented 1 year ago

this is log with execution_mode = "rules" , nothing happen.

[ Info: Querying data from https://api.thegraph.com/subgraphs/name/graphprotocol/graph-network-arbitrum
[ Info: Writing table to data/indexer.csv
[ Info: Writing table to data/allocation.csv
[ Info: Writing table to data/subgraph.csv
[ Info: Writing table to data/network.csv
[ Info: Optimizing
[ Info: Writing results report
[ Info: Executing best strategy
graph indexer rules stop QmRhYzT8HEZ9LziQhP6JfNfd4co9A7muUYQhPMJsMUojSF
graph indexer rules stop QmThfpPfhwWz1tX8vWtiE7d6tF5KWvJ1nUgFCPRsB359tW
graph indexer rules stop QmVbiz3FCPGTvmuWTyV45JKQAE7JGDmZCkRwQSqTYaR2Er
graph indexer rules stop QmVmmRFcY5szJNvnkz7cZwWLpogyFWfcSXYyQejhJF7mBt
graph indexer rules stop QmW72yLHBi9rtxEYHwci2KDMApigSRVSiKF8GPQ8eboroD
graph indexer rules stop QmYHc14knquHS4aL84JjZxiXg3gGGSqRJHd2ByzjdCrtXy
graph indexer rules stop Qma7bdQ3t7PpN19Qc4h37umg7ffZA3PyKNyNjb5koYNqVb
graph indexer rules stop Qmb9vnaGFvjorr1jnVr55tR43ezxJrev8WHkpR7e9c4it7
Check allocation status being closed before submitting: graph indexer rules set Qmb9vnaGFvjorr1jnVr55tR43ezxJrev8WHkpR7e9c4it7 decisionBasis always allocationAmount 652174.7
anirudh2 commented 1 year ago

Alright perfect. That helps me narrow down what's going on. At this point, we're sure it's action queue related, which I thought was the case from the stacktrace. I'm unsure whether the problem is with the endpoint in your config file "http://localhost:8000" or if it's some problem on our end. @hopeyen is probably better placed to help you with that since I don't have an instance of the action queue that I can test against. I'll hand this issue to her.

hopeyen commented 1 year ago

Hi @suntzu93 , I think Ani has the right question here. Is http://localhost:8000 your indexer management server url? Are you able to ping the url from the machine you have optimizer running with and receive results like below?

> curl http://localhost:18000
Ready to roll!%                   

(I have the typical default (18000), and actions were sent successfully to the indexer on my end.

suntzu93 commented 1 year ago

@hopeyen sorry my bad , 18000 is correct , you guys should be update 8000 to 18000 from this docs https://github.com/graphprotocol/allocation-optimizer/blob/main/docs/src/configuration.md#actionqueue

I changed to 18000 but nothing happen after run tool with execution_mode = "rules":

[ Info: Querying data from https://api.thegraph.com/subgraphs/name/graphprotocol/graph-network-arbitrum
[ Info: Writing table to data/indexer.csv
[ Info: Writing table to data/allocation.csv
[ Info: Writing table to data/subgraph.csv
[ Info: Writing table to data/network.csv
[ Info: Optimizing
[ Info: Writing results report
[ Info: Executing best strategy
graph indexer rules stop QmRhYzT8HEZ9LziQhP6JfNfd4co9A7muUYQhPMJsMUojSF
graph indexer rules stop QmThfpPfhwWz1tX8vWtiE7d6tF5KWvJ1nUgFCPRsB359tW
graph indexer rules stop QmVbiz3FCPGTvmuWTyV45JKQAE7JGDmZCkRwQSqTYaR2Er
graph indexer rules stop QmVmmRFcY5szJNvnkz7cZwWLpogyFWfcSXYyQejhJF7mBt
graph indexer rules stop QmW72yLHBi9rtxEYHwci2KDMApigSRVSiKF8GPQ8eboroD
graph indexer rules stop QmYHc14knquHS4aL84JjZxiXg3gGGSqRJHd2ByzjdCrtXy
graph indexer rules stop Qma7bdQ3t7PpN19Qc4h37umg7ffZA3PyKNyNjb5koYNqVb
graph indexer rules stop Qmb9vnaGFvjorr1jnVr55tR43ezxJrev8WHkpR7e9c4it7
Check allocation status being closed before submitting: graph indexer rules set Qmb9vnaGFvjorr1jnVr55tR43ezxJrev8WHkpR7e9c4it7 decisionBasis always allocationAmount 652174.7

execution_mode="actionqueue" :

[ Info: Querying data from https://api.thegraph.com/subgraphs/name/graphprotocol/graph-network-arbitrum
[ Info: Writing table to data/indexer.csv
[ Info: Writing table to data/allocation.csv
[ Info: Writing table to data/subgraph.csv
[ Info: Writing table to data/network.csv
[ Info: Optimizing
[ Info: Writing results report
[ Info: Executing best strategy
hopeyen commented 1 year ago

Cool! Will update the docs.

Did your indexer agent receive any POST requests when the tool has executed the strategy? The resulted actions should be pushed to the action queue

suntzu93 commented 1 year ago

Cool! Will update the docs.

Did your indexer agent receive any POST requests when the tool has executed the strategy? The resulted actions should be pushed to the action queue

Thanks, there is an error on my tool side so it doesn't show any action queue, check by cli it has been added to the queue.