-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
secp256k1.go appears to be causing some errors for Google App Engine #297
Comments
Perhaps the []byte array can be more compressed by switching https://github.com/btcsuite/btcd/blob/master/btcec/genprecomps.go#L33 to http://golang.org/pkg/compress/zlib/#NewWriterLevel BestCompression |
IIRC internally 6g (and the other gc compilers?) transforms Could you change the byte slice to a string, and change the bytes.Reader to strings.Reader in precompute.go, and report back on if it will compile? |
I couldn't directly change things to string in loadS256BytePoints(), since However, I did change |
I'll work up a pull request real quick which switches this to a string. |
This commit modifies the pre-computed table used to optimize the secp256k1 scalar multiplication to a string instead of a byte slice. This change makes the compile more efficient since the Go compiler internally represents bytes slices inefficiently. This reduces the memory needed to compile btcec to 3MB versus the previous 40MB before this change. Fixes btcsuite#297.
@ThePiachu: Can you try with pr #298 please? |
This commit modifies the pre-computed table used to optimize the secp256k1 scalar multiplication to a string instead of a byte slice. This change makes the compile more efficient since the Go compiler internally represents bytes slices inefficiently. This reduces the memory needed to compile btcec to 3MB versus the previous 40MB before this change. Fixes btcsuite#297.
This commit modifies the pre-computed table used to optimize the secp256k1 scalar multiplication to a string instead of a byte slice. This change makes the compile more efficient since the Go compiler internally represents bytes slices inefficiently. This reduces the memory needed to compile btcec to 3MB versus the previous 40MB before this change. In addition, it modifies the code which loads the pre-computed table to deserialize directly into the table instead of into locals that are then copied. Fixes btcsuite#297.
It looks like it's working. Cool! |
Thanks for confirming. |
The RPC server is now the first subsystem that is started. Because the RPC server would not be usable without the rest of the subsystems running, all requests are disabled until bingup has finished. This has the added benefit of erroring earlier if the RPC listeners can not be created. Rewrite startup/shutdown logic to simplify shutdown signaling. All cleanup is now run from deferred functions in the main function. Add two new config options to set the read and write ends of a pair of pipes. This is used as a simple mechanism for a parent process to communicate with, observe, and manage the lifetime of a child dcrd process. When the RX (read end) pipe is closed, clean shutdown automatically begins. Add a new flag --lifetimeevents to create and send lifetime event notifications over the TX (write end) pipe during bringup and shutdown. This allows the parent process to observe which subsystems are currently starting, running, and stopping. Fixes btcsuite#297. Fixes btcsuite#298.
The RPC server is now the first subsystem that is started. Because the RPC server would not be usable without the rest of the subsystems running, all requests are disabled until bringup has finished. This has the added benefit of erroring earlier if the RPC listeners can not be created. Rewrite startup/shutdown logic to simplify shutdown signaling. All cleanup is now run from deferred functions in the main function. Add two new config options to set the read and write ends of a pair of pipes. This is used as a simple mechanism for a parent process to communicate with, observe, and manage the lifetime of a child dcrd process. When the RX (read end) pipe is closed, clean shutdown automatically begins. Add a new flag --lifetimeevents to create and send lifetime event notifications over the TX (write end) pipe during bringup and shutdown. This allows the parent process to observe which subsystems are currently starting, running, and stopping. Fixes btcsuite#297. Fixes btcsuite#298.
Rewrite startup/shutdown logic to simplify shutdown signaling. All cleanup is now run from deferred functions in the main function. Add two new config options to set the read and write ends of a pair of pipes. This is used as a simple mechanism for a parent process to communicate with, observe, and manage the lifetime of a child dcrd process. When the RX (read end) pipe is closed, clean shutdown automatically begins. Add a new flag --lifetimeevents to create and send lifetime event notifications over the TX (write end) pipe during bringup and shutdown. This allows the parent process to observe which subsystems are currently starting, running, and stopping. Fixes btcsuite#297. Fixes btcsuite#298.
Rewrite startup/shutdown logic to simplify shutdown signaling. All cleanup is now run from deferred functions in the main function. Add two new config options to set the read and write ends of a pair of pipes. This is used as a simple mechanism for a parent process to communicate with, observe, and manage the lifetime of a child dcrd process. When the RX (read end) pipe is closed, clean shutdown automatically begins. Add a new flag --lifetimeevents to create and send lifetime event notifications over the TX (write end) pipe during bringup and shutdown. This allows the parent process to observe which subsystems are currently starting, running, and stopping. Fixes btcsuite#297. Fixes btcsuite#298.
Rewrite startup/shutdown logic to simplify shutdown signaling. All cleanup is now run from deferred functions in the main function. Add two new config options to set the read and write ends of a pair of pipes. This is used as a simple mechanism for a parent process to communicate with, observe, and manage the lifetime of a child dcrd process. When the RX (read end) pipe is closed, clean shutdown automatically begins. Add a new flag --lifetimeevents to create and send lifetime event notifications over the TX (write end) pipe during bringup and shutdown. This allows the parent process to observe which subsystems are currently starting, running, and stopping. Fixes btcsuite#297. Fixes btcsuite#298.
Rewrite startup/shutdown logic to simplify shutdown signaling. All cleanup is now run from deferred functions in the main function. Add two new config options to set the read and write ends of a pair of pipes. This is used as a simple mechanism for a parent process to communicate with, observe, and manage the lifetime of a child dcrd process. When the RX (read end) pipe is closed, clean shutdown automatically begins. Add a new flag --lifetimeevents to create and send lifetime event notifications over the TX (write end) pipe during bringup and shutdown. This allows the parent process to observe which subsystems are currently starting, running, and stopping. Fixes btcsuite#297. Fixes btcsuite#298.
Rewrite startup/shutdown logic to simplify shutdown signaling. All cleanup is now run from deferred functions in the main function. Add two new config options to set the read and write ends of a pair of pipes. This is used as a simple mechanism for a parent process to communicate with, observe, and manage the lifetime of a child dcrd process. When the RX (read end) pipe is closed, clean shutdown automatically begins. Add a new flag --lifetimeevents to create and send lifetime event notifications over the TX (write end) pipe during bringup and shutdown. This allows the parent process to observe which subsystems are currently starting, running, and stopping. Fixes btcsuite#297. Fixes btcsuite#298.
Rewrite startup/shutdown logic to simplify shutdown signaling. All cleanup is now run from deferred functions in the main function. Add two new config options to set the read and write ends of a pair of pipes. This is used as a simple mechanism for a parent process to communicate with, observe, and manage the lifetime of a child dcrd process. When the RX (read end) pipe is closed, clean shutdown automatically begins. Add a new flag --lifetimeevents to create and send lifetime event notifications over the TX (write end) pipe during bringup and shutdown. This allows the parent process to observe which subsystems are currently starting, running, and stopping. Fixes btcsuite#297. Fixes btcsuite#298.
This commit modifies the pre-computed table used to optimize the secp256k1 scalar multiplication to a string instead of a byte slice. This change makes the compile more efficient since the Go compiler internally represents bytes slices inefficiently. This reduces the memory needed to compile btcec to 3MB versus the previous 40MB before this change. In addition, it modifies the code which loads the pre-computed table to deserialize directly into the table instead of into locals that are then copied. Fixes [#297](btcsuite/btcd#297) Source commit at btcd/btcec@f6a437d4c90ba153f45deb6c58c43744e917ed79
The long []byte array in the file appears to be causing some issues for Google App Engine - https://groups.google.com/forum/#!topic/google-appengine-go/YRsH3cWdql8 .
Is that data necessary for the library to function, or does it simply speed the process up?
The text was updated successfully, but these errors were encountered: