Skip to content

Conversation

@joshua-kim
Copy link
Contributor

Why this should be merged

Factored out of #3294

How this works

Introduces a rpc to sync the headers from the plugin vm. Our current implementation does not work because the headers is just a map/not an interface, so any modifications to the map are not synced across avalanchego <-> the plugin.

How this was tested

Added a regression test

Need to be documented in RELEASES.md?

Yes

Signed-off-by: Joshua Kim <20001595+joshua-kim@users.noreply.github.com>
request := &http.Request{
Body: io.NopCloser(strings.NewReader("bar")),
Header: http.Header{
"Upgrade": {"upgrade"},
Copy link
Contributor Author

@joshua-kim joshua-kim Apr 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have to specify this header because this fixes the bug when we're not using http simple. I'm also wondering if we should just remove serveHTTPSimple entirely...

Signed-off-by: Joshua Kim <20001595+joshua-kim@users.noreply.github.com>
@joshua-kim joshua-kim marked this pull request as ready for review April 29, 2025 19:28
Signed-off-by: Joshua Kim <20001595+joshua-kim@users.noreply.github.com>
Signed-off-by: Joshua Kim <20001595+joshua-kim@users.noreply.github.com>
@joshua-kim joshua-kim self-assigned this Apr 29, 2025
@joshua-kim joshua-kim added the bug Something isn't working label Apr 29, 2025
Signed-off-by: Joshua Kim <20001595+joshua-kim@users.noreply.github.com>
joshua-kim and others added 4 commits April 30, 2025 11:48
Co-authored-by: Stephen Buttolph <stephen@avalabs.org>
Signed-off-by: Joshua Kim <20001595+joshua-kim@users.noreply.github.com>
Co-authored-by: Stephen Buttolph <stephen@avalabs.org>
Signed-off-by: Joshua Kim <20001595+joshua-kim@users.noreply.github.com>
Co-authored-by: Stephen Buttolph <stephen@avalabs.org>
Signed-off-by: Joshua Kim <20001595+joshua-kim@users.noreply.github.com>
Signed-off-by: Joshua Kim <20001595+joshua-kim@users.noreply.github.com>
@joshua-kim joshua-kim enabled auto-merge April 30, 2025 16:17
Co-authored-by: Stephen Buttolph <stephen@avalabs.org>
Signed-off-by: Joshua Kim <20001595+joshua-kim@users.noreply.github.com>
Signed-off-by: Joshua Kim <20001595+joshua-kim@users.noreply.github.com>
Signed-off-by: Joshua Kim <20001595+joshua-kim@users.noreply.github.com>
Signed-off-by: Joshua Kim <20001595+joshua-kim@users.noreply.github.com>
Signed-off-by: Joshua Kim <20001595+joshua-kim@users.noreply.github.com>
Signed-off-by: Joshua Kim <20001595+joshua-kim@users.noreply.github.com>
Signed-off-by: Joshua Kim <20001595+joshua-kim@users.noreply.github.com>
Signed-off-by: Joshua Kim <20001595+joshua-kim@users.noreply.github.com>
Signed-off-by: Joshua Kim <20001595+joshua-kim@users.noreply.github.com>
Signed-off-by: Joshua Kim <20001595+joshua-kim@users.noreply.github.com>
Signed-off-by: Joshua Kim <20001595+joshua-kim@users.noreply.github.com>
Signed-off-by: Joshua Kim <20001595+joshua-kim@users.noreply.github.com>
@StephenButtolph StephenButtolph changed the title Fix bug in rpcchainvm where writes in a the plugin would not be propagated back to the client Ensure HTTP headers are propagated through the rpcchainvm Apr 30, 2025
@StephenButtolph StephenButtolph disabled auto-merge May 1, 2025 00:58
joshua-kim added 2 commits May 1, 2025 11:20
Signed-off-by: Joshua Kim <20001595+joshua-kim@users.noreply.github.com>
Signed-off-by: Joshua Kim <20001595+joshua-kim@users.noreply.github.com>
@joshua-kim joshua-kim added this pull request to the merge queue May 1, 2025
Merged via the queue into master with commit 2011735 May 1, 2025
24 checks passed
@joshua-kim joshua-kim deleted the rpcchainvm-headers-bug branch May 1, 2025 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants