-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Geth Compatibility #71
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,27 @@ | ||
FROM ethereum/client-go | ||
## Begin ethereum/client-go | ||
# Build Geth in a stock Go builder container | ||
FROM golang:1.13-alpine as builder | ||
|
||
RUN apk add --no-cache make gcc musl-dev linux-headers git | ||
|
||
RUN mkdir /go-ethereum | ||
RUN git clone https://github.com/K-Ho/go-ethereum.git /go-ethereum | ||
RUN cd /go-ethereum && make all | ||
|
||
# Pull all binaries into a second stage deploy alpine container | ||
FROM alpine:latest | ||
|
||
RUN apk add --no-cache ca-certificates | ||
COPY --from=builder /go-ethereum/build/bin/* /usr/local/bin/ | ||
|
||
EXPOSE 8545 8546 8547 30303 30303/udp | ||
|
||
## end ethereum/client-go | ||
|
||
RUN apk add --no-cache openssl jq | ||
COPY rollup-fullnode.json /etc/ | ||
COPY entrypoint.sh /bin | ||
RUN chmod +x /bin/entrypoint.sh | ||
|
||
EXPOSE 9545 | ||
ENTRYPOINT ["sh", "/bin/entrypoint.sh"] | ||
ENTRYPOINT ["sh", "/bin/entrypoint.sh"] |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -491,21 +491,28 @@ export class DefaultWeb3Handler implements Web3Handler, FullnodeHandler { | |
throw Error(msg) | ||
} | ||
|
||
const receipt: OvmTransactionReceipt = await this.getTransactionReceipt( | ||
ovmTxHash, | ||
true | ||
) | ||
log.debug( | ||
`Transaction receipt for ${rawOvmTx}: ${JSON.stringify(receipt)}` | ||
) | ||
if (!receipt || !receipt.status) { | ||
log.debug(`Transaction reverted: ${rawOvmTx}, ovmTxHash: ${ovmTxHash}`) | ||
throw new RevertError(receipt.revertMessage) | ||
} | ||
|
||
await this.processTransactionEvents(receipt) | ||
this.context.provider | ||
.waitForTransaction(internalTxHash) | ||
.then(async () => { | ||
const receipt: OvmTransactionReceipt = await this.getTransactionReceipt( | ||
ovmTxHash, | ||
true | ||
) | ||
log.debug( | ||
`Transaction receipt for ${rawOvmTx}: ${JSON.stringify(receipt)}` | ||
) | ||
if (!receipt) { | ||
log.error(`Unable to find receipt for raw ovm tx: ${rawOvmTx}`) | ||
return | ||
} else if (!receipt.status) { | ||
log.debug(`Transaction reverted: ${rawOvmTx}`) | ||
} else { | ||
log.debug(`Transaction mined successfully: ${rawOvmTx}`) | ||
await this.processTransactionEvents(receipt) | ||
} | ||
this.blockTimestamps[receipt.blockNumber] = timestamp | ||
}) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This looks good! I remember @willmeister raising a concern about the logic at the end of this function when it reverts. However, to me it looks good! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I was uncertain if |
||
|
||
this.blockTimestamps[receipt.blockNumber] = timestamp | ||
log.debug(`Completed send raw tx [${rawOvmTx}]. Response: [${ovmTxHash}]`) | ||
// Return the *OVM* tx hash. We can do this because we store a mapping to the ovmTxHashs in the EM contract. | ||
return ovmTxHash | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.